Request.QueryString problem

M

mortb

I can't see why this will not work for you. I've done this a lot of times
using ; instead of # as separator
My best bet is changing the # character in your qs.

/mortb
 
J

john smith

Paul said:
I am creating a asp.net web page on c#. When call the url which is my web
project... http://localhost/webapp/testpage.aspx?test=1234#item

On the load of the page testpage.aspx I have code...
Request.QueryString["test"]

This returns 1234`

Why does is stop at the #? How do I make is work so that the value 1234#item
is returned?
That's normal behavior - it's not an ASP.Net specific problem or
anything. The # sign is used as a delimiter in the URI to separate the
page fragment identifier (i.e. anchor). There is a RFC about this.
You'll have to URLEncode it first (i.e. %23). Same for other reserved
characters.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top