aaryan
December 28th, 2006, 01:55 AM
hi all,
i just want an interpretation for the following code.
<EditItemTemplate>
Item:
<asp:Label id="Label1"
Text='<%# ((DataRowView)Container.DataItem)["Item"] %>'
runat="server"/>
Price:
<asp:TextBox id="Text2"
Text='<%# DataBinder.Eval(Container.DataItem, "Price") %>'
runat="server"/>
The second code means that we are binding to a datafield price of the datasource. Now what does the first code mean? under what circumstances or situations should we use each?
i just want an interpretation for the following code.
<EditItemTemplate>
Item:
<asp:Label id="Label1"
Text='<%# ((DataRowView)Container.DataItem)["Item"] %>'
runat="server"/>
Price:
<asp:TextBox id="Text2"
Text='<%# DataBinder.Eval(Container.DataItem, "Price") %>'
runat="server"/>
The second code means that we are binding to a datafield price of the datasource. Now what does the first code mean? under what circumstances or situations should we use each?