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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -