Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Visual Web Developer, accessing data...
Old 05-17-2007, 02:12 AM Visual Web Developer, accessing data...
Junior Talker

Posts: 1
Trades: 0
I'm creating a web application using Visual Web Developer Express and have run into a few (seemingly basic) problems. The application takes advantage of some of the built-in Login controls to track any users that log onto the site. This is working fine, and I have it set up to where a user's username is displayed in the sidebar when he/she is logged in.

My one question, what I've been struggling with for some time, is just how to access this username with my own code in a separate file (such as a Page_load function on the master page) once someone has logged in. I know it must be stored as some kind of session data, but I've no idea where. I need to take this username, which is actually more of an id, and run some custom DB queries...


So, to sum up, simple question -> Where the hell do these login controls store the data?
Thanks!
Tekk960 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-17-2007, 03:58 AM Re: Visual Web Developer, accessing data...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Cookies or Session data most likely, look in the code for things like

session("userid") =

response.cookies("userid") =

the name of the cookie or session value might not be exactly that but you should get close.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-17-2007, 05:25 AM Re: Visual Web Developer, accessing data...
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
This is from memory and it's late, but I think what you're looking for can be accessed through your code from the System.Web.HttpContext object. Or something very much like that.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to Visual Web Developer, accessing data...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11317 seconds with 12 queries