Search This Blog

Monday, March 7, 2011

How can ues post method when ues Master page in ASP.NET

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);

No comments :