Groups | Blog | Home
all groups > asp.net > february 2006 >

asp.net : Bound NavigateUrl issue


VB Programmer
2/6/2006 11:53:14 PM
ASP.NET 2.0.....

In my DataList I have a hyperlink like this...

NavigateUrl='Shop.aspx?CategoryId=<%# Bind("CategoryId")%>'

This navigates incorrectly to here:

Shop.aspx?CategoryId=<%# Bind("CategoryId")%>

Any ideas how I can fix this?

Thanks!

VB Programmer
2/7/2006 5:24:20 PM
Anyone? Seems like a common issue...

[quoted text, click to view]

VB Programmer
2/7/2006 9:53:03 PM
I figured it out...

<ItemTemplate>
<asp:HyperLink id=hlLink runat="server" NavigateUrl='<%#
"Shop.aspx?CategoryId=" & Eval("CategoryId").ToString %>'
Font-Size="XX-Small" Font-Bold="True" ForeColor="RoyalBlue" Text='<%#
Eval("CategoryName", "{0}") %>'></asp:HyperLink>
</ItemTemplate>

Hope this is helpful to someone....

Thanks!

[quoted text, click to view]

Patrick.O.Ige
2/8/2006 12:00:00 AM
Where are you doing this in the code behind or ASPX page?
Patrick

[quoted text, click to view]

AddThis Social Bookmark Button