V
VB Programmer
I have a datalist with a hyperlink in the Item Template.
When I set the NavigateUrl simply to this, the databound CategoryId shows up
fine:
<asp:HyperLink id=hlLink runat="server"
NavigateUrl='<%#Container.DataItem("CategoryId")%>'>
<%# Container.DataItem("CategoryName") %>
</asp:HyperLink>
When I try to add it as a querystring it doesn't show up correctly. For
example, if I set NavigateUrl to this:
NavigateUrl='Shop.aspx?CategoryId=<%#Container.DataItem("CategoryId")%>'>
The URL address is this:
Shop.aspx?CategoryId=<%#Container.DataItem("CategoryId")%>
Any ideas on how to fix this?
Thanks!
When I set the NavigateUrl simply to this, the databound CategoryId shows up
fine:
<asp:HyperLink id=hlLink runat="server"
NavigateUrl='<%#Container.DataItem("CategoryId")%>'>
<%# Container.DataItem("CategoryName") %>
</asp:HyperLink>
When I try to add it as a querystring it doesn't show up correctly. For
example, if I set NavigateUrl to this:
NavigateUrl='Shop.aspx?CategoryId=<%#Container.DataItem("CategoryId")%>'>
The URL address is this:
Shop.aspx?CategoryId=<%#Container.DataItem("CategoryId")%>
Any ideas on how to fix this?
Thanks!