c# - Replace Query String of a page -
i want replace query string of page this-
firstly move page on clicking on menu bar items setting url- response.redirect("searchtworkforcereport.aspx?page=search");
then want change url this-
"searchtworkforcereport.aspx?page=search" "searchtworkforcereport.aspx?page=edit" on check box change event. try code-
string strquerystring = request.querystring.tostring(); if (strquerystring.contains("page")) { strquerystring = strquerystring.replace("search", "edit"); }
and it'll replace query string on page load if query string should give again previous set string.
type = request.querystring["page"].tostring();
you can't edit query string of page editing request.querystring
. should redirect current page. use code below:
if (request.rawurl.contains("page")) { response.redirect(request.rawurl.replace("search", "edit")) }
Comments
Post a Comment