Are you doing
<code>
//Login logic
/* SNIP */
if(isAuthenticated)
{
Session["username"] = theUserName;
Response.Redirect("profile.aspx");
}
else
{
//Show error
}
</code>
Because that should work, (make sure you check for null when you try and get
the session variable back in your profile page e.g:
<code>
string username = Session["username"];
if(string.IsNullOrEmpty(username))
{
//Show not logged in error
}
else
{
//Get profile information from DB
}
</code>
Hope that helps...
Rob.
blog: http://www.electricbiro.co.uk
twitter: rsleggett
2008/11/6 Justin <[EMAIL PROTECTED]>
>
> I'm using MS Visual Web Developer 2008 Express, programming in JS and
> running SQL Express. I'm also using the CreateUserWizard and use the
> Login control.
>
> When a user is created or logs in, they are forwarded to their profile
> page where I want to retrieve their information from a table I made in
> a separate database that uses the user's username as a primary key.
>
> My problem is, I can't for the life of me figure out how to retrieve
> this information. I have tried storing the username in a session
> variable from the Login page, however, when I get to the profile page,
> that variable appears blank. I've also tried programmatically
> retrieving the username (my preferred method) but I get a nullpointer
> error. And I've tried using the userID but I can't add the attribute
> to the Parameters list, it complains about the datatype being
> incompatible (not sure which datatype to use for unique identifier).
> I'm very new to ASP.NET, and I see a lot of questions about retrieving
> user info from another database, but nothing seems to be working, and
> I'm starting to get frustrated.
>
> Thanks for any input...