Can I avoid sessions for this type page?

Results 1 to 2 of 2

Thread: Can I avoid sessions for this type page?

  1. #1
    Michael_R Guest

    Default Can I avoid sessions for this type page?

    Obviously, I&#039m a little new to this. I&#039m trying to avoid session variables as much as possible, but I&#039m stuck for a way around it on one particular app.<BR><BR>I&#039ve created a worksheet that takes ~25 fields of data and performs calculations; these are displayed on a different page, and from there the user can display 2 charts, again on different pages. I currently store the data in a Dictionary object, and pass it betweeen the pages in a session variable (I know, evil); how can I do it otherwise without putting everything on a single page?

  2. #2
    Richard L. Guest

    Default RE: Can I avoid sessions for this type page?

    Pass the data by putting it in a form and then submitting the form to each page you want to see the data.<BR><BR>Once you&#039ve built the first form, you can get all the elements of it like this:<BR><BR>For each thing in Request.Form<BR> response.write thing.Name & " &#124 " & thing.Value<BR>Next<BR><BR>Where thing is any name you want, thing.Name is the name attribute you gave the input tags and thing.Value is the value entered in that field.<BR><BR>To keep it over more than one page, simply do the above, only instead of printing it out, write a form with all hidden input types:<BR><BR>For each thing in Request.Form<BR> response.write "&#060;input type=&#039hidden&#039 name=&#039" & thing.Name & "&#039 value=&#039" & thing.Value & "&#039&#062;<BR>Next<BR><BR>Richard L.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •