1

I am having an issue with using the NavigateUrl within a HyperLink asp.net tag. The navigationUrl works as in go to the page I want it to go, but when I try to get the Query String "n" it gives me <% instead of the number value within the DataBind. Here is the code:

<asp:HyperLink runat="server" NavigateUrl="~/MyWebsite/info.aspx?n='<%#DataBinder.Eval(Conatainer.DataItem, "num")%>' /> 

Thank you for your help!

0

1 Answer 1

2

Try with:

 <asp:HyperLink runat="server" NavigateUrl='<%# String.Format("~/MyWebsite/info.aspx?n={0}", DataBinder.Eval(Container, "DataItem.num").ToString())%>' >Text</asp:HyperLink> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.