In cs.aspx page i have a button with following code:
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/cs.aspx?p=ali#25");
}
In page_load i get query string and display it:
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["p"] != null)
{
string p = Request.QueryString["p"];
Response.Write("p= "+p);
}
}
in query string:
p = ali#25
but in run time display
p = ali
why string after # not shown.
#is a reserved character and has meaning in urls; the part of the URL after#is never sent to the server. If you mean to represent the value"ali#25", you will need to url-encode it - but you should be doing that anyway, as a matter of routine.