•
•
•
•
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 391,639 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 2,816 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: 1661 | Replies: 9
![]() |
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
Im new to ASP.NET. Im trying to create a webpage in VS.NET, with details like Name, Age, Designation, Marital Status (as labels) and a corresponding extBox for each of the label(For Marital Status, its a radio button each for Single and Married). There is also a SUBMIT button at the bottom. Once the USer enters the details, and clicks the SUBMIT button, it should throw up another page with the details that the user had enterd.
I have created 2 webpages with the required labels, textboxes etc. But Im confused on how to pass the data from the 1st page to the 2nd one.
Could anyone help??
Thanx.
Kally
Im new to ASP.NET. Im trying to create a webpage in VS.NET, with details like Name, Age, Designation, Marital Status (as labels) and a corresponding extBox for each of the label(For Marital Status, its a radio button each for Single and Married). There is also a SUBMIT button at the bottom. Once the USer enters the details, and clicks the SUBMIT button, it should throw up another page with the details that the user had enterd.
I have created 2 webpages with the required labels, textboxes etc. But Im confused on how to pass the data from the 1st page to the 2nd one.
Could anyone help??
Thanx.
Kally
Hi Kally,
You have many options. Here are the most common two options:
Each method has its benefits and drawbacks. Since you're a beginner I would suggest the first. Use a search engine to find tutorials on those; I'm sure you'll find plenty.
Cheers.
You have many options. Here are the most common two options:
- ASP.NET Querystrings
- ASP.NET Session State
Each method has its benefits and drawbacks. Since you're a beginner I would suggest the first. Use a search engine to find tutorials on those; I'm sure you'll find plenty.
Cheers.
Last edited by zmariow : Aug 22nd, 2007 at 3:55 am.
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hi Zmariow,
Thanks for your answer. I was able to find a way of passing data using a QueryString. But Im hab\ving one problem. While I was able to extract data from te text boxes and the dropdown list, Im unable to get the selected data from the radiobuttons. Could you help me with that?
Thanks.
Kally
Thanks for your answer. I was able to find a way of passing data using a QueryString. But Im hab\ving one problem. While I was able to extract data from te text boxes and the dropdown list, Im unable to get the selected data from the radiobuttons. Could you help me with that?
Thanks.
Kally
Assuming you have a radiobutton with name rb you can write:
You see
string rb_value;
if(rb.Checked)
rb_value = "true";
else
rb_value = "false";You see
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Actually, I have got 2 radiobuttons named RadioButton1 and RadioButton2;
I had created a string for each of them and made an IF clause earlier as below:
string rb1;
If (RadioButton1.Checked) Then rb1="true"
string rb2;
Elseif (RadioButton2.Checked) then rb2="true"
End If;
But im wondering how do I pass this to the query string. The query string is as below:
Response.Redirect("Webform2.aspx?name=" + this.TextBox1.Text + "&dept=" + this.TextBox2.Text + "&st=" + this.DropDownList1.SelectedItem.Text + "&mar=" + this.RadioButton1.Text.ToString());
Im not sure what I have to add along with RadioButton1
I had created a string for each of them and made an IF clause earlier as below:
string rb1;
If (RadioButton1.Checked) Then rb1="true"
string rb2;
Elseif (RadioButton2.Checked) then rb2="true"
End If;
But im wondering how do I pass this to the query string. The query string is as below:
Response.Redirect("Webform2.aspx?name=" + this.TextBox1.Text + "&dept=" + this.TextBox2.Text + "&st=" + this.DropDownList1.SelectedItem.Text + "&mar=" + this.RadioButton1.Text.ToString());
Im not sure what I have to add along with RadioButton1
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
.net .net framework 3.0 access ajax asp breach broadband code combo crime custom daniweb data data protection data transfer database developer development dom drive dropdownlist feed forensics government hard hardware hitachi internet linux microsoft module msdn net news office reader reuse security skin software sql storage terabyte theme vista weather web wikipedia xml xoap
- How to Pass data from JSP page to action class (JSP)
- How do I pass data in string from a form to another? (Visual Basic 4 / 5 / 6)
- Pass data to MessageBox (VB.NET)
- Html+PHP Forms (PHP)
- Getting data from ASP page A to ASP page B using javascript (ASP.NET)
- Passing data from forms from one page to another (JavaScript / DHTML / AJAX)
- $_POST - What does it mean? (PHP)
- how to get pass url variables from one page to another page with out knowing them? (ColdFusion)
Other Threads in the ASP.NET Forum
- Previous Thread: asp.net with MYSQL
- Next Thread: get HTML table property on page load event


Linear Mode