Results 1 to 2 of 2

Thread: Creating a Welcome Cookie.

  1. #1

    Creating a Welcome Cookie.

    Hi Friends,
    Can you just clarify my doubts?
    I have typed as following code for creating a Welcome Cookie.
    <%
    dim num
    response.cookies("num").expires=date+365
    num=request.cookies("num")
    if num="" then
    response.cookies("num")=1
    response.write("Welcome This is the First time you are visiting the Web Page")
    else
    response.cookies("num")=num+1
    response.write("You have visited this")
    response.write("Web page" & num)
    if num=1 then
    response.write "time before"
    else
    response.write "times before"
    end if
    end if
    %>




    This Result should be
    "You have visited Web Page 1 time before"
    But error occurs, i couldn't identify the errors
    if you have find it, please inform me.


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Creating a Welcome Cookie.

    Write the same in .asax
    Application_Start event
    I think This will solve the Pro I guess



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact