get radiobutton values in one page, display in another page...

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
This is what I have and it works but I like to change it..

what i have

User enters a name, clicks submit, i redirect to another page, do a sql to see if the user exsists. If so, i populate a radiobuttonlist. If not, i display user not found. This WORKS.

This is what I LIKE to do

User enters a name, clicks submit, NO redirect, do sql in CLICK event of SUBMIT. If user exsits, do sql and get radiobuttonlist values. If not, display user not found.

question
How do I pass the radiobuttonlist values to the next page?
 
Where does your radiobutton list fit in? You say user submits name and hits submit to another page, when what you want is to PostBack to the same page. Can you explain what the radiobutton list does.
 
I have page1 and Page2:

Page1 has:

text field, and submit button.

Page2 has:

RadiobuttonList

---
This is what I want to do:
Page1
have textfield.have submit button.Do the sql and get the values for the radiobuttonlist.Pass the values to page2

Page2:

Grab the radiobuttonlist values and display.

--- This is what I have now

page1:

have textfield. Have submit button. But redirects to page2.

Page2:
It has radiobuttonlist and does the sql.

-- Basically, i want to do a sql in page1, in submit clickevent and pass the data to page2 and have page2 display the values/rows in radiobuttonlist.
 
You would then have to pass information between two pages. Consider querystrings, sessions, cookies. But since the data you want passed is a collection of items, it might be better to keep it in a vb.net datatype, like a dataset, then you could use Server.Transfer,put it in a session variable, or even in a Application item. Is it that much of a problem to do the SQL lookup on the second page?
 
Thanks for your response. It's not a problem to do the sql lookup on the second page...i thought maybe it's simpler to pass the buttonlist values. Ill keep it as is. thanks again.
 
Back
Top