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
Post a Comment