Need Help with Session Object

Results 1 to 3 of 3

Thread: Need Help with Session Object

  1. #1
    Join Date
    Dec 1969

    Default Need Help with Session Object

    Hi <BR>I am pretty new in ASP and I have some trouble with using <BR>the Session Object.<BR>If I write something like this :<BR><BR>&#060;FORM method=post action=test.asp&#062;<BR>&#060;input type=text name="some_name"&#062;<BR>&#060;input type=text name="some_value"&#062;<BR>&#060;input type=submit name=btnSubmit&#062;<BR>&#060;/FORM&#062;<BR>&#060;% <BR>var Name=Request.Form("some_name")<BR>var Val=Request.Form("some_value")<BR>Session(Name)=Va l<BR>%&#062;<BR><BR>I get the following error message:<BR>Cannot store the intrinsic ASP object inside the Session<BR>object<BR><BR>What do I do wrong ?<BR>and what can I do to make my script work ?<BR>In global I need to use Global variables , so if there is another way to do so please let me know.<BR>Thanks to all .

  2. #2
    Tummala Guest

    Default RE: Need Help with Session Object

    Don&#039t use Name and val as ur variables.they r reserved words.<BR>Also when ur assigning a value to a session variable, enclose the session variable in double quotes i.e<BR>session("firstname")=fname<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Need Help with Session Object

    variable names have to be one word<BR><BR>&#060;% <BR>Name=Request.Form("some_name")<BR>Val=Request. Form("some_value")<BR>Session(Name)=Val<BR>%&#062; <BR><BR>

Posting Permissions

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