SaxoMT4


Oil Of Asia iOption

Advertise here
  • Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Depressed
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • Results 1 to 10 of 10

    Thread: ASP Cookies

    1. #1
      learvy's Avatar
      learvy is offline MTV Regular
      is loves her dadhie and baby
       
      I am:
      Friendly
       
      Join Date
      May 2011
      Posts
      754
      MTV$
      353

      ASP Cookies

      What is a Cookie?

      A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

      How to Create a Cookie?

      The "Response.Cookies" command is used to create cookies.

      Note: The Response.Cookies command must appear BEFORE the <html> tag.

      In the example below, we will create a cookie named "firstname" and assign the value "Alex" to it:

      Code:
      <%
      Response.Cookies("firstname")="Alex"
      %>
      It is also possible to assign properties to a cookie, like setting a date when the cookie should expire:

      Code:
      <%
      Response.Cookies("firstname")="Alex"
      Response.Cookies("firstname").Expires=#May 10,2012#
      %>


      How to Retrieve a Cookie Value?

      The "Request.Cookies" command is used to retrieve a cookie value.

      In the example below, we retrieve the value of the cookie named "firstname" and display it on a page:

      Code:
      <%
      fname=Request.Cookies("firstname")
      response.write("Firstname=" & fname)
      %>
      Output: Firstname=Alex

      A Cookie with Keys

      If a cookie contains a collection of multiple values, we say that the cookie has Keys.

      In the example below, we will create a cookie collection named "user". The "user" cookie has Keys that contains information about a user:

      Code:
      <%
      Response.Cookies("user")("firstname")="John"
      Response.Cookies("user")("lastname")="Smith"
      Response.Cookies("user")("country")="Norway"
      Response.Cookies("user")("age")="25"
      %>


      Read all Cookies

      Look at the following code:

      Code:
      <%
      Response.Cookies("firstname")="Alex"
      Response.Cookies("user")("firstname")="John"
      Response.Cookies("user")("lastname")="Smith"
      Response.Cookies("user")("country")="Norway"
      Response.Cookies("user")("age")="25"
      %>

      Assume that your server has sent all the cookies above to a user.

      Now we want to read all the cookies sent to a user. The example below shows how to do it (note that the code below checks if a cookie has Keys with the HasKeys property):

      Code:
      <html>
      <body>
      
      <%
      dim x,y
      for each x in Request.Cookies
        response.write("<p>")
        if Request.Cookies(x).HasKeys then
          for each y in Request.Cookies(x)
            response.write(x & ":" & y & "=" & Request.Cookies(x)(y))
            response.write("<br />")
          next
        else
          Response.Write(x & "=" & Request.Cookies(x) & "<br />")
        end if
        response.write "</p>"
      next
      %>
      
      </body>
      </html>



      Output:

      firstname=Alex

      user:firstname=John
      user:lastname=Smith
      user:country=Norway
      user:age=25

      source: w3schools
      Last edited by learvy; 05-14-2011 at 06:03 PM.

    2. # ADS
      Advertise here Circuit advertisement
      Join Date
      My Birthday
      Posts
      Million and counting
       
    3. #2
      rabindra1 is offline Banned
      This user has no status.
       
      I am:
      ----
       
      Join Date
      Aug 2012
      Posts
      463
      MTV$
      1,116

      Re: ASP Cookies

      i think asp cookies is a each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

    4. #3
      o1bhusal is offline Banned
      This user has no status.
       
      I am:
      ----
       
      Join Date
      Aug 2012
      Posts
      338
      MTV$
      829

      Re: ASP Cookies

      I think that ASP cookies will identify the user name as well as its some feature The creating of cookies in ASP is very easy as well as it is very comfortable.We can create a cookies as example above shown in the posting.

    5. #4
      benmoriz is offline Banned
      is who wander are lost!!!
       
      I am:
      Amused
       
      Join Date
      Sep 2012
      Posts
      1,704
      MTV$
      5,031

      Re: ASP Cookies

      i think asp cookies is a each time the same computer requests a page with a browser, it will send the cookie too. With ASPI think that ASP cookies will identify the user name as well as its some feature The creating of cookies in ASP is very easy as well as it is very comfortable.

    6. #5
      rammajhi12 is offline MTV Regular
      This user has no status.
       
      I am:
      ----
       
      Join Date
      Sep 2012
      Posts
      349
      MTV$
      8

      Re: ASP Cookies

      i think asp cookies is a each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values. .We can create a cookies as example above shown in the posting.

    7. #6
      njtboy is offline Banned
      This user has no status.
       
      I am:
      ----
       
      Join Date
      Sep 2012
      Posts
      1,129
      MTV$
      3,336

      Re: ASP Cookies

      A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

    8. #7
      ashishrock is offline Banned
      is music is my life
       
      I am:
      Amused
       
      Join Date
      Sep 2012
      Posts
      1,047
      MTV$
      1,042

      Re: ASP Cookies

      A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.
      The "Response.Cookies" command is used to create cookies.

      Note: The Response.Cookies command must appear BEFORE the <html> tag.

      In the example below, we will create a cookie named "firstname" and assign the value "Alex" to it:

      <%
      Response.Cookies("firstname")="Alex"
      %>
      It is also possible to assign properties to a cookie, like setting a date when the cookie should expire:

      <%
      Response.Cookies("firstname")="Alex"
      Response.Cookies("firstname").Expires=#May 10,2012#
      %>

    9. #8
      bimal chand is offline Banned
      is is banned for copy pasting
       
      I am:
      ----
       
      Join Date
      Oct 2012
      Posts
      340
      MTV$
      1,000

      Re: ASP Cookies

      A cookie is often used to identify a user.
      A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

      How to Create a Cookie?

      The "Response.Cookies" command is used to create cookies.

      Note: The Response.Cookies command must appear BEFORE the <html> tag.

      In the example below, we will create a cookie named "firstname" and assign the value "Alex" to it:

      <%
      Response.Cookies("firstname")="Alex"
      %>
      It is also possible to assign properties to a cookie, like setting a date when the cookie should expire:

      <%
      Response.Cookies("firstname")="Alex"
      Response.Cookies("firstname").Expires=#May 10,2012#
      %>

    10. #9
      paudelsonu88 is offline MTV Regular
      This user has no status.
       
      I am:
      ----
       
      Join Date
      Nov 2012
      Posts
      323
      MTV$
      863

      Re: ASP Cookies

      ASP Cookies can also be called as a thread which contains a small piece of information which refers to the username states the identity of the users who requests a web page.

    11. #10
      Gaurab Mishra is offline MTV Regular
      is looking forward
       
      I am:
      Innocent
       
      Join Date
      Jan 2013
      Posts
      375
      MTV$
      817

      Re: ASP Cookies

      With the help of ASP, you can both create and retrieve cookie values.so it can also be called as a thread

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

    Tags for this Thread

    Bookmarks

    Posting Permissions

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