Pass 3 text values from one webpage to other

S

Sharon

hello all,

I was successfull in passing one value from first webpage to second
webpage, but not sure how to pass three textbox values from the first
page to the second page. Below is the code i was using to pass a single
value

First WebPage:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim targetpage As String
targetpage = "webform2.aspx?Text=" + tbfirst.Text
Response.Redirect(targetpage, True)
End Sub

Second WebPage:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim textstr As String
textstr = Request("Text")
Label1.Text = textstr
End If
End Sub

Can anyone tell me how to go about passing three values to the
secondpage. Thanks in advance.

cheers, Shilpa.
 
K

Kodali Ranganadh

Same thing LIke ..


targetpage = "webform2.aspx?Text=" + tbfirst.Text
+"&Val1="+tbsecond.Text +"&val2="+tb3rd.Text;

In the Command Button Click and then ...



textstr = Request.QueryString[Text];
TextVal1=Request.QueryString[Val1];
TextVal2=Request.QueryString[val2];


Like that in u r ..Target Page ..
All the Best ..
 
S

Sharon

Thank you for the reply.

I got one question, I have created an link button on first page and
when i click this button the second page is opened which contains the
three textbox values and also a button.

When i click the button on the second page i want the textbox values to
be passed onto the first page how do i do that.

What changed do i have to make in the code below please advise.

Dim targetpage As String
targetpage = "staffdetails.aspx?Text=" + tbfirst.Text +
"&Val1=" + tblast.Text
+ "&val2=" + tbdept.Text
Response.Redirect(targetpage, True)

cheers, Shilpa.

Kodali said:
Same thing LIke ..


targetpage = "webform2.aspx?Text=" + tbfirst.Text
+"&Val1="+tbsecond.Text +"&val2="+tb3rd.Text;

In the Command Button Click and then ...



textstr = Request.QueryString[Text];
TextVal1=Request.QueryString[Val1];
TextVal2=Request.QueryString[val2];


Like that in u r ..Target Page ..
All the Best ..


hello all,

I was successfull in passing one value from first webpage to second
webpage, but not sure how to pass three textbox values from the first
page to the second page. Below is the code i was using to pass a single
value

First WebPage:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim targetpage As String
targetpage = "webform2.aspx?Text=" + tbfirst.Text
Response.Redirect(targetpage, True)
End Sub

Second WebPage:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim textstr As String
textstr = Request("Text")
Label1.Text = textstr
End If
End Sub

Can anyone tell me how to go about passing three values to the
secondpage. Thanks in advance.

cheers, Shilpa.
 
P

Patrick.O.Ige

Shilpa if you want to get back to the previous page then just do the same
Patrick

Sharon said:
Thank you for the reply.

I got one question, I have created an link button on first page and
when i click this button the second page is opened which contains the
three textbox values and also a button.

When i click the button on the second page i want the textbox values to
be passed onto the first page how do i do that.

What changed do i have to make in the code below please advise.

Dim targetpage As String
targetpage = "staffdetails.aspx?Text=" + tbfirst.Text +
"&Val1=" + tblast.Text
+ "&val2=" + tbdept.Text
Response.Redirect(targetpage, True)

cheers, Shilpa.

Kodali said:
Same thing LIke ..


targetpage = "webform2.aspx?Text=" + tbfirst.Text
+"&Val1="+tbsecond.Text +"&val2="+tb3rd.Text;

In the Command Button Click and then ...



textstr = Request.QueryString[Text];
TextVal1=Request.QueryString[Val1];
TextVal2=Request.QueryString[val2];


Like that in u r ..Target Page ..
All the Best ..


hello all,

I was successfull in passing one value from first webpage to second
webpage, but not sure how to pass three textbox values from the first
page to the second page. Below is the code i was using to pass a single
value

First WebPage:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim targetpage As String
targetpage = "webform2.aspx?Text=" + tbfirst.Text
Response.Redirect(targetpage, True)
End Sub

Second WebPage:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim textstr As String
textstr = Request("Text")
Label1.Text = textstr
End If
End Sub

Can anyone tell me how to go about passing three values to the
secondpage. Thanks in advance.

cheers, Shilpa.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top