【问题标题】:GridView Container.DataItem?GridView Container.DataItem?
【发布时间】:2010-11-22 17:38:15
【问题描述】:

问这个有点惭愧,但是,GridView 中 DataGrid 中的 Container.DataItem 是什么。我不想使用 Eval,也不想将它绑定到 DataSource 控件。我希望能够在模板字段中做到这一点<%#((MyType)Container.DataItem).MyAttribute %>

已解决:没关系,它确实有效,我的标签在 aspx 页面中没有正确关闭。

【问题讨论】:

    标签: asp.net gridview


    【解决方案1】:

    您可以将 Container.DataItem 与 GridView 一起使用 - 那里的内容看起来不错。你遇到了什么错误?

    此链接也可能有帮助:What's the deal with DataBinder.Eval and Container.DataItem?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-09-21
      • 1970-01-01
      • 1970-01-01
      • 2014-04-14
      • 2010-11-13
      • 2010-09-17
      • 1970-01-01
      相关资源
      最近更新 更多