Home » questions » ASP Question?

ASP Question?

2006-08-04 05:22:36, Category: Programming & Design
I'm studing a code thats in ASP, there is something like this: Response.Cookies ("MATLog")("UserName") = objRec("userID") Response.Cookies ("MATLog")("Name") = objRec("userName") Response.Cookies ("MATLog")("Matrik")= objRec ("studentNo") ----------------------------- I know that thats about cookies,but i dont know what are MATlog and Matrik for?and if they are somehow playing the role of variable or identifier for cookies(?)then what are they stand for? what are these lines doing?

Answers

  1. paulo_d888

    On 2006-08-06 05:08:29


    I dunno the answer to this.. but I just admire that you're a guru in ASP.. keep it up.
  2. sellis_sellis

    On 2006-08-06 05:16:06


    The code is Response.Cookies("[key]")("[item]")=[value] where: [key] is the key, or section of the cookie to write to [item] is the item within the sub-section [value] is the value you are writing these values can be anything you want. In your example, MATLog is the subsection of the cookie and UserName, Name and Matrik and the item names being stored. Basically you're just storing data for retrieval at some later point and/or somewhere else in your site code.