Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 19, 2007 11:56 AM by sachin_himcs
Member
32 Points
61 Posts
Dec 19, 2007 09:15 AM|LINK
Hi all ,
i've got data from user input textbox on page 1
i want to retrieve this user input data on page 2 to display on a label.
????????????? HOW ?????????
Kayln
122 Points
39 Posts
Dec 19, 2007 11:23 AM|LINK
There are several ways to do that
View state
Hidden field
session
query string
Among the above you can use any one of them
For reference : http://www.querycat.com/faq/aae9524c4bbac8c21c6c6809cf643535
if u have any concerns post me
-Vikash
319 Points
115 Posts
Dec 19, 2007 11:27 AM|LINK
HI
U have to pass the value to the second Page using
Response.Redirect("secondpage.aspx?id"=textbox1.text);
And then Retrive the value in the second page using
Request.QueryString["id"].ToString()
Regards
Karthikeyan.
Participant
886 Points
160 Posts
Dec 19, 2007 11:28 AM|LINK
Hi
there are some methods to do this ,in that query string is one of the method.
for that you put this code in page1 button click event
Label1.Text = Request.QueryString[
1084 Points
169 Posts
Dec 19, 2007 11:29 AM|LINK
Hi,
In page1 on button click event, add query string variable like this,
Response.Redirect("page2.aspx?val="+txtbox1.Text);
and in Page2 -- on load event, retrieve that variable.
string str = Request.QueryStrinf["val"].ToString();
HTH
Mustakim Mansuri
All-Star
26568 Points
3688 Posts
MVP
Dec 19, 2007 11:41 AM|LINK
below is a nice article with example on QueryString
Passing variables between pages using QueryString
hope it helps./.
50 Points
45 Posts
Dec 19, 2007 11:56 AM|LINK
hi Kayln, in .net 2.0 you can use directive @previouspagetype to get control value on next page.you read this tutorial. http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx?ArticleID=9e2b12e6-7842-419d-a3c9-df58f6aba523 http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Sachin Kulshreshtha
plz mark if it is your answer of your question.
PrincessKita...
Member
32 Points
61 Posts
????how to use Request.QueryString????
Dec 19, 2007 09:15 AM|LINK
Hi all ,
i've got data from user input textbox on page 1
i want to retrieve this user input data on page 2 to display on a label.
????????????? HOW ?????????
Kayln
balavanchi
Member
122 Points
39 Posts
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:23 AM|LINK
There are several ways to do that
View state
Hidden field
session
query string
Among the above you can use any one of them
For reference : http://www.querycat.com/faq/aae9524c4bbac8c21c6c6809cf643535
if u have any concerns post me
-Vikash
'work smarter not harder'
karthikeyan_...
Member
319 Points
115 Posts
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:27 AM|LINK
HI
U have to pass the value to the second Page using
Response.Redirect("secondpage.aspx?id"=textbox1.text);
And then Retrive the value in the second page using
Request.QueryString["id"].ToString()
Regards
Karthikeyan.
Happy Smiling
Regards
Karthikeyan
http://www.karthidotnet.blogspot.com/
rajakec
Participant
886 Points
160 Posts
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:28 AM|LINK
Hi
there are some methods to do this ,in that query string is one of the method.
for that you put this code in page1 button click event
Response.Redirect("~/form2.aspx?id=123"); then in form2 load event you can retrieve the value byLabel1.Text = Request.QueryString[
"id"].ToString();mustakim
Participant
1084 Points
169 Posts
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:29 AM|LINK
Hi,
In page1 on button click event, add query string variable like this,
Response.Redirect("page2.aspx?val="+txtbox1.Text);
and in Page2 -- on load event, retrieve that variable.
string str = Request.QueryStrinf["val"].ToString();
HTH
Mustakim Mansuri
Mustakim Mansuri (MCTS, MCPD)
kaushalparik...
All-Star
26568 Points
3688 Posts
MVP
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:41 AM|LINK
below is a nice article with example on QueryString
Passing variables between pages using QueryString
hope it helps./.
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.
sachin_himcs
Member
50 Points
45 Posts
Re: ????how to use Request.QueryString????
Dec 19, 2007 11:56 AM|LINK
hi Kayln,
in .net 2.0 you can use directive @previouspagetype to get control value on next page.you read this tutorial.
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx?ArticleID=9e2b12e6-7842-419d-a3c9-df58f6aba523
http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Sachin Kulshreshtha
plz mark if it is your answer of your question.