Re: 2 questions please
- From: ckerns@xxxxxxxxxx
- Date: Wed, 11 Jul 2007 13:06:36 -0400
On Wed, 11 Jul 2007 08:30:35 -0000, Masudur <munnacs@xxxxxxxxx> wrote:
On Jul 11, 12:35 pm, cke...@xxxxxxxxxx wrote:
I have a page that has a LogInView. Inside of it is a LogIn control.
The login control is in the anonymous template and a staus view is in
the logged on template. (Names: LogInView1, Login1, & LogInStatus1.)
quest 1. How can I set focus to the UserName textbox of the LogIn
control (inside of LogInView)?
quest 2. I want to assign the UserName value to a session variable
when the LogIn btn is clicked, how can I do this?
tia
ck
Hi
User Javascript to set focus to the textbox..... of the login control
and in loggedin event of the logincontrol user the following code to
save the user name
Session["UserName"] = Page.User.Identity.Name;
by the way why you need to save the user name in session?
you always have "Page.User.Identity.Name" to get the current username
Thanks
Md. Masudur Rahman ( Munna )
kaz Software Ltd.
http://www.kaz.com.bd
http://munnacs.110mb.com
Should i put the javascript to set focus in the body tag? How should
it look since the control I'm going for is nested?
I have tried this:
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs)
MsgBox(Me.LoginView1.Page.User.Identity.Name)
MsgBox(Page.User.Identity.Name.ToString())
End Sub
but both boxes come up empty. Do I need to include a namespace here?
I want to capture the uname and pw so I can a) log all login attempts
and b) I want to use session(pw") and session("un") as parameters in
my SQL statements to pull the corresponding records from tables.
I am pretty good at asp classic, but I am trying to teach myself
..net...it is challenging in some areas, easy in others. Any help you
could give is greatly appreciated.
ck
.
- Follow-Ups:
- Re: 2 questions please
- From: Cubaman
- Re: 2 questions please
- From: Masudur
- Re: 2 questions please
- References:
- 2 questions please
- From: ckerns
- Re: 2 questions please
- From: Masudur
- 2 questions please
- Prev by Date: Problem sending PDF as stream using iTextSharp
- Next by Date: Re: gray out or disable underlying page on click
- Previous by thread: Re: 2 questions please
- Next by thread: Re: 2 questions please
- Index(es):
Relevant Pages
|
|