Home DotNet NavigateUrl and Eval databinding
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>



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

"