Urgent: Putting Session Level Variables Into A Sel

Results 1 to 3 of 3

Thread: Urgent: Putting Session Level Variables Into A Sel

  1. #1
    Vipul Desai Guest

    Default Urgent: Putting Session Level Variables Into A Sel

    I am trying to write a database application with many ASP files where I need to put items into a Selection Box. The idea is that I want an identical control as a combo box within Visual Basic. Thus a user could select an item within a Selection and then goto another screen. I can read the selection by using the Request.Form statement. But then I want the user to go back to the same page where he or she made a selection. The selected item should appear from the Selection Box. Instead, what I am geting is the default set of items within the Selection Box.<BR><BR>Can someone please help?<BR><BR>&#062;&#062; Thanks, Vipul<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    89

    Default RE: Urgent: Putting Session Level Variables Into A

    When the user selects som item and moves forward you should execute the followinf code<BR><BR>set session("somevariable")=request.form("selecteditem ")<BR><BR>when the user again comes back to the page or when even for the first time the page is being viewed, the follwing code should take care of your problem<BR><BR>&#060;select name=selecteditem&#062;<BR>&#060;% for i = minvalue to maxvalue&#062;<BR>&#060;Option<BR> &#060;% if i=session("somevariable") then %&#062;<BR> selected&#062;OptionText <BR> &#060;% Else %&#062;<BR> &#062;OptionText<BR> &#060;% End if %&#062;<BR> &#060;% Next %&#062;<BR><BR>then you would get the item which was selected earlier as the default selection.

  3. #3
    Krush Guest

    Default RE: Urgent: Putting Session Level Variables Into A

    Can u send me ur files.I can have a look at it and understand it better

Posting Permissions

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