Manually filling rows of data in ASP.NET controls can be a bit unintuitive. I’ll go over a few things I learned recently. I’m writing up this posting off the top of my head, so I can’t say for certain the code examples are correct in syntax. Use the template field in your grid view as it’s the most flexible to deal with as apposed to using asp bind field tags or other means. <asp:TemplateField HeaderText="A Column"> <ItemTemplate> <a href="http://address"><%# Bind("dbField") %></a> </ItemTemplate> </asp:TemplateField> The example above is a column template field with the Bind() function call. Bind() is a special function that can be used to link data that the template field has access to within the grid row. You can also use Eval() which just prints the data and does not hard link the control and data like Bind() does. Also take note of the # in the asp tags <%# %> this is shorthand for...
Computers, programming, software development, AI, design, and more!