When use master page then form tag ues in master page but we want post our page from index.asp to index1.aspx in this case ues this code on cs page.
****************************Page index.aspx.cs************************************
protected void Page_Load(object sender, EventArgs e)
{
HtmlForm TEST;
TEST = (HtmlForm)Master.FindControl("form1");
TEST.Method = "post";
TEST.Action = "index1.aspx";
}
********************************Page index.aspx1.cs*******************************************
string textvalur=request("control name);
****************************Page index.aspx.cs************************************
protected void Page_Load(object sender, EventArgs e)
{
HtmlForm TEST;
TEST = (HtmlForm)Master.FindControl("form1");
TEST.Method = "post";
TEST.Action = "index1.aspx";
}
********************************Page index.aspx1.cs*******************************************
string textvalur=request("control name);
No comments :
Post a Comment