public void Submit1_Click(Object sender, EventArgs E)
{
string strheadlinesid1 = string.Empty;
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Convert.ToString(Request.QueryString["folder"].ToString())))
{
strheadlinesid1 = Request.QueryString["folder"].ToString();
}
}
string URL = "view4.aspx?value="+strheadlinesid1;
Response.Redirect(URL);
}
This is a function I’m using but when I pass strheadlinesid1, “value” variable in URL is getting nothing.Why Is it happening.Is there any wrong in this approach.
On the button click, the page will be in the postback state and your condition will be false
if (!IsPostBack)so it will not enter into the block and hence the value will not be assigned tostrheadlinesid1this block
should be