protected void Button1_Click(object sender, EventArgs e)
{
Request.Redirect("Default2.aspx?username=honge");
}
string username = Request.QueryString["username"];
string username = Ruquest.Form["receive"];
protected void Button1_Click(object sender, EventArgs e)
{
Session["username"] = "honge";
Request.Redirect("Default2.aspx");
}
string username = Session["username"];
protected void Button1_Click(object sender, EventArgs e)
{
Application["username"] = "honge";
Request.Redirect("Default2.aspx");
}
string username = Application["username"];
public string Name
{
get
{
return "honge";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Server.Transfer("Default2.aspx");
}
send d = Context.Handler as send ;
if (d != null)
{
Response.Write(d.Name);
}
PreviousPage d = Context.Handler as PreviousPage ;
if (d != null)
{
Response.Write(d.Name);
}
send.aspx:receive.aspx:string name = PreviousPage.Name;
private void Button1_Click(object sender, System.EventArgs e)
{
string url;
url="anotherwebform.aspx?name=" + TextBox1.Text + "&email=" + TextBox2.Text;
Response.Redirect(url);
}
private void Page_Load(object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["name"];
Label2.Text=Request.QueryString["email"];
}
private void Button1_Click(object sender, System.EventArgs e)
{
file://textbox1 and textbox2 are webform
file://controls
Session["name"]=TextBox1.Text;
Session["email"]=TextBox2.Text;
Server.Transfer("anotherwebform.aspx");
}
private void Page_Load(object sender, System.EventArgs e)
{
Label1.Text=Session["name"].ToString();
Label2.Text=Session["email"].ToString();
Session.Remove("name");
Session.Remove("email");
}
public string Name
{
get
{
return TextBox1.Text;
}
}
public string EMail
{
get
{
return TextBox2.Text;
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
Server.Transfer("anotherwebform.aspx");
}
private void Page_Load(object sender, System.EventArgs e)
{file://create instance of source web form
WebForm1 wf1;
file://get reference to current handler instance
wf1=(WebForm1)Context.Handler;
Label1.Text=wf1.Name;
Label2.Text=wf1.EMail;
}