[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I fill out an HTML form using Session data?

Posted on 2007-10-08
6
Medium Priority
?
139 Views
Last Modified: 2008-03-03
I have an html page with a form that has several fields. When you click submit, it first checks to make sure the form data is valid using JavaScript.  It then posts to a classic ASP page where the form data is redisplayed for validation and stored in session.  it can go through several more classic ASP pages until it reaches a screen where they can choose to go back to the first page and change the data.
What is the best way to pull the data out of Session, and display it in the correct fields in the form on the HTML page?
Thanks.
0
Comment
Question by:pamh_cfcausa
  • 3
  • 2
6 Comments
 
LVL 23

Assisted Solution

by:basicinstinct
basicinstinct earned 400 total points
ID: 20037027
just do something like this:

<input type='text' value='<%= Session("mysessionvariable") %>'/>

http://www.w3schools.com/asp/asp_sessions.asp
0
 

Author Comment

by:pamh_cfcausa
ID: 20040830
Thanks - this works great for text boxes.  What should I do for radio buttons and drop down selection lists?
0
 

Author Comment

by:pamh_cfcausa
ID: 20041091
Also:  text area boxes and check boxes?  Thanks for your help.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Accepted Solution

by:
R_Harrison earned 1600 total points
ID: 20041163
CheckBox

<input type="checkbox" name="YourFieldName" value="YourDataValue" <%If Session("mysessionvariable")="YourDataValue" Then response.write("checked")%> >

Drop Down

<select name="YourFieldName">
<option <%If Session("mysessionvariable")="YourDataValue" Then response.write("selected")%>>YourDataValue</option>
0
 

Author Comment

by:pamh_cfcausa
ID: 20042036
Thanks to you both - these work great!
I still need help with the radio button and the text area box.
Thanks again.
0
 
LVL 12

Assisted Solution

by:R_Harrison
R_Harrison earned 1600 total points
ID: 20042171
text area

<textarea name="YourFieldName"><%=Session("mysessionvariable")%></textarea>

Radio Button (basically the same as a checkbox)
<input type="radio" name="YourFieldName" value="YourDataValue" <%If Session("mysessionvariable")="YourDataValue" Then response.write("checked")%> >
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question