By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Pass 3 text values from one webpage to other

P: n/a
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.

Nov 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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 ..
On Nov 23, 9:15 am, "Sharon" <sharonrao...@yahoo.com.auwrote:
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.
Nov 23 '06 #2

P: n/a
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 Ranganadh wrote:
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 ..
On Nov 23, 9:15 am, "Sharon" <sharonrao...@yahoo.com.auwrote:
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.
Nov 23 '06 #3

P: n/a
Shilpa if you want to get back to the previous page then just do the same
Patrick

"Sharon" <sh**********@yahoo.com.auwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
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 Ranganadh wrote:
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 ..
On Nov 23, 9:15 am, "Sharon" <sharonrao...@yahoo.com.auwrote:
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.

Nov 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.