I want to replace the Query String of my page like this-
firstly I move to this page on clicking on menu bar Items by setting this URL- Response.Redirect("SearchtWorkForceReport.aspx?page=Search");
then I want to change url like this-
"SearchtWorkForceReport.aspx?page=Search" to "SearchtWorkForceReport.aspx?page=Edit" on a check box change event. I try this code-
string strQueryString = Request.QueryString.ToString();
if (strQueryString.Contains("page"))
{
strQueryString = strQueryString.Replace("Search", "Edit");
}
and it'll replace the Query String but on page load if I get the query string should give again the previous set string.
type = Request.QueryString["page"].ToString();