CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: sessions

  1. #1
    Join Date
    Aug 2001
    Posts
    4

    sessions

    i am developing an online store,wherein the shopping is possible only in few countries.once a user selects a country ,he can shop for only that country,upon selecting another country he should not have any recoooooords of the previous country,for example,if i have added item 1 in my cart for country1,and next if i select country 2,item 1 should not be present in my cart.
    my code for this was

    Language=VBScript


    'Dim str,conn,rs,session

    country = Request.Form("country") '
    'Session("Country")=country
    'if Session("country")"" then
    ''Session("country")=nothing
    'set Session("country")=nothing
    'Else
    Session("Country")=country 'stores country value in Country
    cun=Session("Country")


    if (cun="") then
    Response.Redirect("error.html")
    Else


    i had used the code commented above but it does not work.please suggest me what to do.
    in brief i want to:
    first check if the session value country is present or not ,if it is present ,i want to kill it and then again create the session value session and proceed with my code for further information.


  2. #2
    Join Date
    Jan 2001
    Posts
    365

    Re: sessions

    Hi friend,
    This is ur Code:
    - why the line 3 is needed.each time u assing the value to country.so the country var always contains value. then how can u kill the session vaue. i dont know its a prob.may be this also can be problem. other wise pls send ur the asp code. then i can try.. Thanks

    1.country = Request.Form("country") '
    3.'Session("Country")=country
    4.'if Session("country")"" then
    5.''Session("country")=nothing
    6.'set Session("country")=nothing
    7.'Else
    8.Session("Country")=country 'stores country 9.value in Country
    cun=Session("Country")


    if (cun="") then
    Response.Redirect("error.html")
    Else


    Bala
    Prelude Solution Providers (P) Ltd.
    Chennai.India

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured