在ASP.NET中数据绑定时,您如何知道使用Container.DataItem?有参考吗? [英] How do you know to use Container.DataItem when data binding in ASP.NET? Is there a reference?

查看:302
本文介绍了在ASP.NET中数据绑定时,您如何知道使用Container.DataItem?有参考吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有数据绑定的参考?我看到一些不同的数据绑定方式,但我从未找到参考。有没有?

Is there a reference for data binding? I've seen a bunch of different ways to data bind things, but I've never found a reference. Is there one?

我知道有Bind和Eval,但是Container.DataItem什么时候发挥作用?是否有其他隐藏的对象和方法可用?或者是Container.DataItem这里使用的对象?

I know there are Bind and Eval, but when does Container.DataItem come into play? Are there other "hidden" objects and methods available? Or is Container.DataItem the object that is being used here?

推荐答案


Container.DataItem何时进入
播放?

when does Container.DataItem come into play?

从下面的第一个链接(稍作改写):Container.DataItem是一个运行时别名绑定列表中该特定项目的DataItem。

From the first link below (paraphrasing slightly): "Container.DataItem is a runtime alias for the DataItem for this specific item in a bound list."


是否有其他隐藏对象和
方法可用?

Are there other "hidden" objects and methods available?

绝对其他 DataBinder 类成员,再加上 TemplateControl ,其中包含 Eval 并提供方法查询绑定的Xml数据。

Definitely the other DataBinder class members, plus TemplateControl, which houses Eval and provides methods to query bound Xml data.


我已经看到一些不同的方式来
数据绑定的东西,但我从来没有发现
a参考。有没有一个?

I've seen a bunch of different ways to data bind things, but I've never found a reference. Is there one?

这些都是你所得到的:

  • What's the deal with Databinder.Eval and Container.DataItem? (Short and sweet)
  • ASP.NET data binding overview
  • Data-Binding Expressions Overview

这篇关于在ASP.NET中数据绑定时,您如何知道使用Container.DataItem?有参考吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆