Alex Rivera | Logout

How can I remove item from querystring in asp.net using c#?

Asked 2009-02-09T19:35:38.033
54

I want remove "Language" querystring from my url. How can I do this? (using Asp.net 3.5 , c#)

Default.aspx?Agent=10&Language=2

I want to remove "Language=2", but language would be the first,middle or last. So I will have this

Default.aspx?Agent=20
Edit
Report

1 Answer

1

Get the querystring collection, parse it into a (name=value pair) string, excluding the one you want to REMOVE, and name it newQueryString

Then call Response.Redirect(known_path?newqueryString);

answered 2009-02-09T19:45:28.197

Your Answer