•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,417 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,689 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 365 | Replies: 5
![]() |
•
•
Join Date: Mar 2008
Posts: 119
Reputation:
Rep Power: 1
Solved Threads: 0
From form1 I m passing the values of two textboxes & on form 2 I m receiving it---
FORM1 CODE-
FORM2 CODE--
But the error is coming
FORM1 CODE-
asp Syntax (Toggle Plain Text)
protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("default4.aspx?roll="+TextBox1.Text); Response.Redirect("default4.aspx?name="+TextBox2.Text); }
FORM2 CODE--
asp Syntax (Toggle Plain Text)
protected void Page_Load(object sender, EventArgs e) { Label1.Text = Request.QueryString["roll"].ToString(); Label2.Text = Request.QueryString["name"].ToString(); }
But the error is coming
Last edited by peter_budo : May 14th, 2008 at 3:30 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation:
Rep Power: 3
Solved Threads: 47
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation:
Rep Power: 3
Solved Threads: 47
Try removing the .ToString part of your Form 2 code like this :
I think this will help, let me know how you get on...
asp Syntax (Toggle Plain Text)
FORM2 CODE-- protected void Page_Load(object sender, EventArgs e) { Label1.Text = Request.QueryString["roll"]; Label2.Text = Request.QueryString["name"]; }
I think this will help, let me know how you get on...
Last edited by majestic0110 : May 14th, 2008 at 3:37 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Mar 2008
Posts: 119
Reputation:
Rep Power: 1
Solved Threads: 0
ASP Syntax (Toggle Plain Text)
protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("default4.aspx?roll="+TextBox1.Text); Response.Redirect("default4.aspx?name="+TextBox2.Text); }
ASP Syntax (Toggle Plain Text)
protected void Page_Load(object sender, EventArgs e) { Label1.Text = Request.QueryString["roll"]; Label2.Text = Request.QueryString["name"]; }
On Form2 Only the value of first textbox is displayed,value of second textbox is not displayed
Last edited by peter_budo : May 15th, 2008 at 4:25 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation:
Rep Power: 3
Solved Threads: 47
Please use code tags, it looks very untidy without them, with regards to the 2nd label not showing have you sorted this yet?
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: May 2008
Location: India
Posts: 66
Reputation:
Rep Power: 1
Solved Threads: 2
The problem is that you are using 2 Response.Redirects. Use this code to append both values to the same Querystring:
Then retrieve the values in the Label as you have done.
Regards
Sunil Punjabi
<URL Snipped>
Response.Redirect("default4.aspx?roll="+TextBox1.Text + "&"+"name="+TextBox2.Text);
Then retrieve the values in the Label as you have done.
Regards
Sunil Punjabi
<URL Snipped>
Last edited by peter_budo : May 18th, 2008 at 4:26 am. Reason: Keep It Organized - please use [code] tags + Keep It Spam-Free - Do not spam, advertise, plug your website, or engage in any other type of self promotion.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the ASP.NET Forum
- Previous Thread: String connection
- Next Thread: Simple DropDownLisT Example



Linear Mode