I have an application that extracts data from some xml that is stored in a database. In the Page_Load event I have the code extracting the xml out of the db, parsing the XML and saving the data I need in a list of Strings. Then I use this code:
dataGrid.DataSource = from field in stringList select field;
dataGrid.DataBind();
It prints out the list, but I need to have more control over it. The GridView properties in the GUI don’t really reflect anything from the Page_Load event (which I’m not too surprised about) but I need to be able to generate hyperlinks with the data and using an HTMLTextWriter didn’t work as the GridView just auto-escaped all the HTML. I am not really a .Net programmer and am not familiar with how this works. Should I have put the custom code somewhere other that the Page_Load event?
http://msdn.microsoft.com/en-us/library/bb288031.aspx
you can use a template field and inside your item template, you would have a asp:hyperlink control. You would then use a <%#Bind(Container)%> in your asp:hyperlink) NavigateURL property)to bind