asp.net mvc - how can i pass a "&" into a querystring value -


i have link in app following url:

 http://www.mysite.com/test?group=mygroup 

the issue 1 of groups called group & b

when try , parse on serverside (through request.querystring["group"])

 http://www.mysite.com/test?group=group & b 

i get

group='group ' (because of &)

how can change url can deal values "&" inside of them.

use urlencode method make text safe querystring.

var url = "http://www.mysite.com/test?group=" +             system.web.httpserverutility.urlencode("group & b"); 

Comments