undesired behavior in setting hyperlink .NavigateURL property

B

Boban Dragojlovic

in the codebehind portion of a page, I dynamically create a series of
hyperlinks that I add to the page.

in that code, I have something like this:

dim h as new hyperlink

h.NavigateURL = "/somepage.aspx?age=35&gender=M"


Unfortunately, when it renders the HTML page, it changes the ampersand in
the URL as follows

h.NavigateURL = "/somepage.aspx?age=35&gender=M"


This, of course, doesn't work, because the 2nd parameter's name has now been
changed from 'gender' to 'amp;gender'


How can I get around this?


(I tried setting the 'href' attribute directly ...
h.attributes.add("href","/somepage.aspx?age=35&gender=M") ... but it
produces the same result)
 
V

vMike

One more comment, the & should not effect the url query string. It
should still work the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top