Hi all,
This is the situation: I have a web part that has a GridView and I would like the GridView in the Web Part to have the same behaviour as the GridView shown under "Formatted GridView Editing" in http://msconline.maconstate.edu/Tutorials/ASPNET2/ASPNET09/aspnet09-01.aspx. The problem is that, as far us I understand, I can't create a web part by using tags, like the code shown, I would have to use classes and instances of them. Now, everything is easy until you get to <%# Bind() %> and <%# Eval() %>, how can I represent them? Would I have to write my own?
Here is a sample of the code and the tags I want to translate:
<asp:TemplateField HeaderText="Type"
ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:Label Text='<%# Eval("ItemType") %>' Runat="Server"/>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="EditType" DataSourceID="TypeSource" Runat="Server"
DataTextField="ItemType" DataValueField="ItemType" SelectedValue='<%# Bind("ItemType") %>'/>
</EditItemTemplate>
</asp:TemplateField>
The underlined lines are what I don't know how to translate.
Thank you!