| NavigateUrl and Eval databinding |
|
If you are having trouble setting the value from the databound database field to the Text or NavigateUrl attributes here is an example of how you can do it.
<asp:TemplateField HeaderText="Documents"> <itemtemplate> <asp:HyperLink ID="lnkDocUrl" runat="server" Text='<%# EVAL("Documents") %>' NavigateUrl='<%#"Default.aspx?ID=" + EVAL("DocID") %>'/> </itemtemplate> </asp:TemplateField>
|