开发者

Difference between usage of eval expressions in asp.net

I have been just trying to understand what does eval do. Suppose, I have a gridview - what is the difference if I use

Text='<%# Eval("FieldName开发者_如何学C") %>' in .aspx

and

DataBinder.Eval(e.Row.DataItem, "FieldName") in aspx.cs

Can anyone explain in simple terms what does each one of these do and in what case should we use them? Or can they be used interchangeably?


Generally, there is no difference between these two methods as the Eval actually calls the DataBinder.Eval method. For more details, please refer to

DataBinder.Eval vs Eval

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜