If you want to bind data to template fields you just need to use Bind function
For example i need to bind TextBox value with my data that is return from store procedure,right now Tracking_Number is the field name that I need to bind.
<asp:TemplateField HeaderText="Tracking Number">
<ItemTemplate>
<asp:TextBox ID="txtboxTrackingNumber" runat="server" Enabled ="false" Text='<%#Bind("Tracking_Number") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
Reference:
https://www.codeproject.com/Questions/254659/Binding-data-to-template-fields
For example i need to bind TextBox value with my data that is return from store procedure,right now Tracking_Number is the field name that I need to bind.
<asp:TemplateField HeaderText="Tracking Number">
<ItemTemplate>
<asp:TextBox ID="txtboxTrackingNumber" runat="server" Enabled ="false" Text='<%#Bind("Tracking_Number") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
Reference:
https://www.codeproject.com/Questions/254659/Binding-data-to-template-fields
No comments:
Post a Comment