Click here to Skip to main content
15,914,327 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 18:30
varshavmane16-Sep-07 18:30 
GeneralRe: calling javascript from Login Control Pin
cylene16-Sep-07 20:17
cylene16-Sep-07 20:17 
GeneralRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 20:31
varshavmane16-Sep-07 20:31 
GeneralRe: calling javascript from Login Control Pin
cylene16-Sep-07 20:46
cylene16-Sep-07 20:46 
GeneralRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 21:09
varshavmane16-Sep-07 21:09 
GeneralRe: calling javascript from Login Control Pin
cylene16-Sep-07 21:21
cylene16-Sep-07 21:21 
GeneralRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 21:28
varshavmane16-Sep-07 21:28 
GeneralRe: calling javascript from Login Control Pin
cylene16-Sep-07 21:50
cylene16-Sep-07 21:50 
hihi!

Im saying that if i use


protected void Page_Load(object sender, EventArgs e)
{
Login1.Attributes.Add("Onclick", "return continuePreviousLogin()");

}

the function will run whenever user click on any point in logincontrol box.

But, i want the fuction to run only in Login Authenticate. In between the following function......




-----------------------------------------------------------------------------
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string userName = Login1.UserName;
string password = Login1.Password;

if (GetUserPassword(userName) == password)
{
Session["username"] = userName;
//e.Authenticated = true;
FormsAuthentication.RedirectFromLoginPage(userName, false);
DateTime CurrTime = DateTime.Now;
Session["logintime"] = CurrTime.ToLongDateString();

if (GetUserStatus(userName) == "1")
{
Session["UserRight"] = "Administrator";
Response.Redirect("admin.aspx");
}
else
{
Session["UserRight"] = "Customer";
Response.Redirect("CustomerLoginMain.aspx");
}
}

Response.Write("alert('" + "Error logging in" + "')<" + "/script>");
}

----------------------------------------------------------------------------


ehhhh.....do u understand this way?


lene......

GeneralRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 22:51
varshavmane16-Sep-07 22:51 
AnswerRe: calling javascript from Login Control Pin
subbu.sk16-Sep-07 19:15
subbu.sk16-Sep-07 19:15 
GeneralRe: calling javascript from Login Control Pin
varshavmane16-Sep-07 19:25
varshavmane16-Sep-07 19:25 
AnswerRe: calling javascript from Login Control Pin
Sandeep Akhare16-Sep-07 20:27
Sandeep Akhare16-Sep-07 20:27 
Questionrelating between an asp.net web application and a winform Pin
H.R16-Sep-07 12:36
H.R16-Sep-07 12:36 
AnswerRe: relating between an asp.net web application and a winform Pin
Guffa16-Sep-07 12:44
Guffa16-Sep-07 12:44 
AnswerRe: relating between an asp.net web application and a winform Pin
DigiOz Multimedia16-Sep-07 12:54
DigiOz Multimedia16-Sep-07 12:54 
GeneralRe: relating between an asp.net web application and a winform Pin
H.R16-Sep-07 17:15
H.R16-Sep-07 17:15 
GeneralRe: relating between an asp.net web application and a winform Pin
DigiOz Multimedia17-Sep-07 5:10
DigiOz Multimedia17-Sep-07 5:10 
GeneralRe: relating between an asp.net web application and a winform Pin
H.R17-Sep-07 15:44
H.R17-Sep-07 15:44 
QuestionLogin control help Pin
sjp70016-Sep-07 8:46
sjp70016-Sep-07 8:46 
AnswerRe: Login control help Pin
Sandeep Akhare16-Sep-07 20:29
Sandeep Akhare16-Sep-07 20:29 
QuestionNightly, weekly, monthly autoevents? Pin
Aaron Hudson16-Sep-07 7:41
Aaron Hudson16-Sep-07 7:41 
AnswerRe: Nightly, weekly, monthly autoevents? Pin
DigiOz Multimedia16-Sep-07 13:02
DigiOz Multimedia16-Sep-07 13:02 
GeneralRe: Nightly, weekly, monthly autoevents? Pin
Aaron Hudson16-Sep-07 21:37
Aaron Hudson16-Sep-07 21:37 
GeneralRe: Nightly, weekly, monthly autoevents? Pin
DigiOz Multimedia17-Sep-07 4:52
DigiOz Multimedia17-Sep-07 4:52 
Questiona gridview problem [xmldatasource & xml/xapth][2] Pin
pidakar16-Sep-07 5:53
pidakar16-Sep-07 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.