Re: How to pass username in the login control to next page?



After a user is logged in they should be authenticated. This means you would
access their username through their authentication typically. Try using
Page.User.Identity.Name


--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage


"kai" <kailiang@xxxxxxxxxxxxx> wrote in message
news:LrdCi.6391$Y7.2971@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi, All
I have VB 2005, I use login control to logn in, after log in, I go to
another page. I want to use the login username in another, how to use
session varible to pass the username?

I use the following code, but I cannot login:


Protected Sub Login1_Authenticate1(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.AuthenticateEventArgs)

Session("username") = Login1.UserName

End Sub


Please help
Thanks
Kai



.



Relevant Pages

  • Web Forms Auth fails when rfValidator triggered
    ... I have a simple login page to my intranet-based web. ... basically has a username field, ... If I enter garbage text in BOTH fields, the authentication ... controls do their job and display the "error text" stating ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to pass in username as query parameter?
    ... I need to pass in the username of the login user. ... In addition to the query parameter I set up in the datasource, ... Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Web Proxy / Firewall Client prompting for authentiation
    ... We have recently installed ISA 2004, ... Several of our users are seeing intermittent login dialog boxes asking ... for authentication to connect to the ISA server. ... prompts for a username and password. ...
    (microsoft.public.isa.clients)
  • Re: Logged in twice at the same time?
    ... It depends on what kind of login you are talking about. ... If you are dealing with a .htaccess basic login, and the authentication ... a browser can have lots of different ... >Now the first page shows my original username. ...
    (comp.lang.php)
  • Re: Imagevote script problems
    ... was very unsecure, the authentication was ridiculous, ie, after you ... login, your username is stored as a cookie UNENCRYPTED, and all ... authentication requests are just validated against the username (not ...
    (alt.php)