asp.net - Getting query string parameter value having '&' in it in C# -


i passing url follows ...

response.redirect("~/all-media/books/?serachtext=on&off"); 

where serachtext parameter. so, when access parameter follows, gives me "on" value.

request.querystring["searchtext"] 

so, how can solve this?

this won't work. ampersand needs url encoded.

the url encoded value ampersand %26. can either:

a)

response.redirect("~/all-media/books/?serachtext=on%26off"); 

or b)

response.redirect("~/all-media/books/?serachtext=" + httputility.urlencode("on&off")); 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -