Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Multiformhandiling1 Request.response

Multiformhandiling1 Request.response

Ratings: (0)|Views: 0|Likes:
Published by santhosh1212
multiform handiling in .net
multiform handiling in .net

More info:

Categories:Types, Brochures
Published by: santhosh1212 on Jul 20, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

06/04/2014

pdf

text

original

1)Response.Redirect (single parameter)
Default.aspx
protected voidButton1_Click(objectsender,EventArgs e)
{
Response.Redirect("login.aspx?acno=" + TextBox1.Text);
}
Login.aspx
Drag and droplable1
public partial classlogin : System.Web.UI.Page
{
protected voidPage_Load(objectsender,EventArgs e)
{
Label1.Text = Request["acno"];
}
}2.Change the code as(passing 2 values as parameter[multiple parameters]how

tohandel it?)
Drag and drop TextBox2 and write following code in Button1_Click(.
Default.aspx

protected voidButton1_Click(objectsender,EventArgs e)
{
Response.Redirect("login.aspx?acno="+TextBox1.Text+"&aname="+TextBox2.Text);
}
Login.aspx code is
protected voidPage_Load(objectsender,EventArgs e)
{
Label1.Text = Request["acno"]+"---"+Request["aname"];
}
The url is
http://localhost:7813/multiformhandiling1/login.aspx?acno=1&aname=san
(url changes in Request.Response method but doesnot changes when we use
Server.Transfer()²output is same)
2) Request.Response(url)
Eg: Response.Redirect("http://www.google.com");
Summary of Request.Response()
a)From source page:
1. Request.Response(<pagename>)
2. Request.Response(url)
3. Request.Response(qury)
Eg1:Response.Redirect("login.aspx?acno=" + TextBox1.Text);
Eg2 :Response.Redirect("login.aspx?acno="
+TextBox1.Text+"&aname="+TextBox2.Text);

b) the values coming form sourcepage ishandled in distination page when
parameter is sent in the format of Request.Response(qury)using the key word
Request[³parameter name´]

[Eg1:Response.Redirect("login.aspx?acno=" + TextBox1.Text);
Eg2 :Response.Redirect("login.aspx?acno="
+TextBox1.Text+"&aname="+TextBox2.Text);]
2. Server.Transfer();
Default.aspx.cs
protected voidButton1_Click(objectsender,EventArgs e)
{
Server.Transfer("login.aspx", true);
//Response.Redirect("login.aspx?acno=" +
TextBox1.Text+"&aname="+TextBox2.Text);
}
Login.aspx.cs(drag and drop Lable1)
public partial classlogin : System.Web.UI.Page
{
protected voidPage_Load(objectsender,EventArgs e)
{

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->