Solved

Add a GUID value to the Session variable

Posted on 2013-06-14
2
443 Views
Last Modified: 2013-06-18
I am trying to take the value of a GUID function and add it to a session variable.  How can I do that?
0
Comment
Question by:VBBRett
2 Comments
 
LVL 12

Accepted Solution

by:
jitendra patil earned 500 total points
ID: 39249690
Hi VBRett,
try the below code.

string  g = Guid.NewGuid().ToString() ;
           Session["MyGuid"] = g;
           Response.Write("Guid Generated=>" + Session["MyGuid"].ToString());

hope this helps.
0
 

Author Comment

by:VBBRett
ID: 39250148
That's the thing.  I'm pulling the GUID from a record in the database.  I'll post the code that I have when I get home.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now