need help with asp login control.

Posted by Dmudgal under ASP.NET on 8/13/2012 | Points: 10 | Views : 714 | Status : [Member] | Replies : 2
hello everybody ,

1.i am using asp login control(in login.aspx page), login view and login status(in masterpage.master) in my project.

2. on the click event of the login button i am using my sql server database to compare it with the username and password of the login control

3.the problem is i am getting a 'login attempt failure' message on clicking the login button.
4. and if i hardcode the username and password instead of using sql database , i am logging in without error but then i'm not getting the username on my master page header by using login name control...

this is my first post so pls correct me for any incomplere statements....... i want all these 3 controls to work together correctly....pls help.....do i need to upload my project files??....




Responses

Posted by: Gopesh9 on: 8/13/2012 [Member] Starter | Points: 25

Up
0
Down
If you use username and password directly from the sql server just use the Session variable and then in the Master Page itself using the value of session just use it in the Header.

In the Master Page

Label1.Text = Session["Username"].ToString();


G. S.
.Net Developer

Dmudgal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dmudgal on: 8/13/2012 [Member] Starter | Points: 25

Up
0
Down
thx

Dmudgal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response