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

Posts: 1
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
 
When You Register, These Ads Go Away!
Old 05-17-2007, 02:58 AM Re: Visual Web Developer, accessing data...
chrishirst's Avatar
Super Moderator

Posts: 13,643
Location: Blackpool. UK
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!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-17-2007, 04:25 AM Re: Visual Web Developer, accessing data...
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
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.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to Visual Web Developer, accessing data...
 

Thread Tools

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

vB 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.49785 seconds with 12 queries