asp.net - Redirecting from one page of .aspx to another .aspx page using C# -


i using 2 .aspx pages in application. second page implements dropdownlist binded database using collection. want redirect second page first page. used

response.redirect("~/admin/home.aspx"); 

but throwing exception follows this

system.web.httprequestvalidationexception: potentially dangerous request.form value detected client (ctl00$maincontent$dropdownlist1="").

i want resolve exception. new ideas regarding problem expected.

thanks in advance

i suspect you've misidentified location of error being thrown. it's not in redirection itself, it's in postback calls it.

the actual answer problem can found @ a potentially dangerous request.form value detected client (textboxerror="<responses><response..."); need validaterequest other answers mention, need set requestvalidationmode="2.0" in web.config.


Comments