A
Arpan
A link has the following URL:
<a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%=
Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2")
%>&cplace=<%= Request.QueryString("cplace") %>">Click</a>
Suppose the names in the above querystring have the following values:
cname="Danny"
cadd1="House 97"
cadd2="Sector 3 & 4"
cplace="Timbaktoo"
Becuase of the presence of an ampersand (&) in the value of cadd2 (between 3
and 4), the next page doesn't get the correct querystring. The querystring
carried forward to the next page looks something like this:
Page1.asp?cname=Danny&cadd1=House%2097&cadd2=Sector 3
That's it!!! Now how do I ensure that the presence of ampersand in any value
of the querystring doesn't affect the querystring in any way & the next page
gets the correct querystring? I even tried using Server.URLEncode but that
didn't make any difference.
Thanks,
Arpan
<a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%=
Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2")
%>&cplace=<%= Request.QueryString("cplace") %>">Click</a>
Suppose the names in the above querystring have the following values:
cname="Danny"
cadd1="House 97"
cadd2="Sector 3 & 4"
cplace="Timbaktoo"
Becuase of the presence of an ampersand (&) in the value of cadd2 (between 3
and 4), the next page doesn't get the correct querystring. The querystring
carried forward to the next page looks something like this:
Page1.asp?cname=Danny&cadd1=House%2097&cadd2=Sector 3
That's it!!! Now how do I ensure that the presence of ampersand in any value
of the querystring doesn't affect the querystring in any way & the next page
gets the correct querystring? I even tried using Server.URLEncode but that
didn't make any difference.
Thanks,
Arpan