Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

NEED COOKIE ADVISE


I want to give a userid for each user and track it by userid. I need to
store it in a cookie . What method will be beneficial for that process ?
Using javascript or Server side scripting (asp.net) will be more effective ?
On Jun 6, 3:23 pm, "in da club" <xx> wrote:

> I want to give a userid for each user and track it by userid. I need to
> store it in a cookie . What method will be beneficial for that process ?
> Using javascript or Server side scripting (asp.net) will be more effective ?

Use ASP.NET Session Object.
http://msdn2.microsoft.com/en-us/library/ms178581.aspx

-----------------------------------------------Reply-----------------------------------------------
"in da club" <xx> wrote in message
news:OU36g3DqHHA.4496@TK2MSFTNGP06.phx.gbl...

> I want to give a userid for each user and track it by userid.

OK.

> I need to store it in a cookie .

Why do you need to store it in a cookie...?

> What method will be beneficial for that process ?

A Session variable.

--
http://www.markrae.net

-----------------------------------------------Reply-----------------------------------------------

For performance issue ;)

-----------------------------------------------Reply-----------------------------------------------
On Jun 7, 8:51 am, "in da club" <xx> wrote:

> For performance issue ;)

Ah, performance issue.  Gotta squeeze that extra bit of performance
out of our cookie-setting routine and do it by hand.  Good plan.

Look, Session uses Cookies.  In fact, it sets a Cookie containing
something that you can essentially think of as a UserID.  As in, it
does exactly what you're looking to do already.  And it does it just
as fast as you could by hand, so your "performance" claim only makes
you look like you haven't done your homework.

Look into FormsAuthentication.  Chances are it does exactly what
you're looking for.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

---
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/

-----------------------------------------------Reply-----------------------------------------------

"in da club" <xx> wrote in message
news:eTio6ANqHHA.4152@TK2MSFTNGP04.phx.gbl...

> For performance issue ;)

Er...

--
http://www.markrae.net

-----------------------------------------------Reply-----------------------------------------------

http://www.developerfusion.co.uk/show/4318/2/

take a look

Since session variables are stored on the Web server's memory, storing large
objects in a user's session on a site with many simultaneous users can lead
to reduced memory on the Web server. For more information on session
variables see the Session Variables FAQs on ASPFAQs.com.

I can use javascript to write and read cookies without exhausting my server
resources ;)

-----------------------------------------------Reply-----------------------------------------------

"in da club" <xx> wrote in message
news:%23xv8mHPqHHA.3228@TK2MSFTNGP03.phx.gbl...

> Since session variables are stored on the Web server's memory, storing
> large objects in a user's session on a site with many simultaneous users
> can lead to reduced memory on the Web server. For more information on
> session variables see the Session Variables FAQs on ASPFAQs.com.

Cookies are tiny pieces of textual information, no use at all for "storing
large objects", so your comparison is meaningless.

> I can use javascript to write and read cookies without exhausting my
> server resources ;)

What about the (increasing number of) people who disable cookies and/or
JavaScript...?

--
http://www.markrae.net

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc