473,395 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Bound NavigateUrl issue

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!
Feb 7 '06 #1
3 994
Anyone? Seems like a common issue...

"VB Programmer" <do**@emailme.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
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!

Feb 7 '06 #2
Where are you doing this in the code behind or ASPX page?
Patrick

"VB Programmer" <do**@emailme.com> wrote in message
news:u4****************@TK2MSFTNGP09.phx.gbl...
Anyone? Seems like a common issue...

"VB Programmer" <do**@emailme.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
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!


Feb 8 '06 #3
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!

"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
Where are you doing this in the code behind or ASPX page?
Patrick

"VB Programmer" <do**@emailme.com> wrote in message
news:u4****************@TK2MSFTNGP09.phx.gbl...
Anyone? Seems like a common issue...

"VB Programmer" <do**@emailme.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
> 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!
>



Feb 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: Alex | last post by:
I'm reposting my issue with some more info. I would like to use a DataGrid to display my DataSet. My DataSet is from a table in a SQL DB. Both columns in the table are strings. I would like...
4
by: Tomek R. | last post by:
Hello ! This post does'nt regard column hyperlink. I just have single hyperlink and want to create it's NavigateUrl dynamically. This is my test page <form id="Form1" method="post"...
3
by: VB Programmer | last post by:
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"...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
1
by: jeanluc.praz | last post by:
I created a user control containing containing a few hyperlinks. How can I change the NavigateUrl inside the user control ? So far I did the following: 1) In the custom control Public...
5
by: Vear | last post by:
Sorry, very Newbie question here. I don't know what I'm doing wrong. I have to use a <asp:hyperlink> to go to another page. I want to pick up the value in a text box. This is what I've tried and It...
2
by: smccauslin | last post by:
URLs are stored in a database in a form similar to www.mysite.com. When the user clicks on the link, it should launch a seperate window and go to that site. Here's the code <asp:HyperLink...
6
by: Dmitry Duginov | last post by:
I have a FormView and a HyperLink on the page. If I use the following code behind (hooked up to Hyperlink's OnLoad event), it renders fine protected void link_Load(object sender, EventArgs e)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.