Click here to Skip to main content
15,924,318 members
Home / Discussions / Web Development
   

Web Development

 
QuestionAjax: Login via ModalPopupExtender issue Pin
Goalie359-Jan-09 11:00
Goalie359-Jan-09 11:00 
I have a modalpopupextender for an ajax popup login window on my site. After the user logs in, I want to close the modalpopupextender and redirect them to the page they originated from (I'm using "FormsAuthentication.RedirectFromLoginPage" for this), however I'm getting a "pagerequestmanagerparsererrorexception" javascript error after I click login and try to perform the RedirectFromLoginPage. Is there a way around this issue?

My code looks like the following (I allow the user to login via their email address, hence the "GetUserNameByEmail" line in the code). It fails on the FormsAuthentication.RedirectFromLoginPage... line:

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

protected void LoginButton_Click(object sender, EventArgs e)

{

LoginButton.Attributes.Add("onClick", "this.blur();");

string username = Membership.GetUserNameByEmail(Email.Text);

if (Membership.ValidateUser(username, Password.Text))

{

FormsAuthentication.RedirectFromLoginPage(username, RememberMeCheckbox.Checked);

}

else

{

InvalidLoginLabel.Visible = true;

ModalPopupExtenderLogin.Show();

}

}

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

I understand ajax fails when you try to do a redirect such as this but I don't know of an alternate way to achieve this. Any ideas?

Thanks.

-Goalie35
GeneralRe: Ajax: Login via ModalPopupExtender issue Pin
Shog99-Jan-09 14:00
sitebuilderShog99-Jan-09 14:00 
QuestionWeb Development Problem : Java Script Pin
Anudeep Jaiswal - MCA9-Jan-09 2:37
Anudeep Jaiswal - MCA9-Jan-09 2:37 
AnswerCROSS POST Pin
Not Active9-Jan-09 3:24
mentorNot Active9-Jan-09 3:24 
QuestionASP.NET 3.5 SP1 Server Side Viewstate Pin
L Viljoen8-Jan-09 23:13
professionalL Viljoen8-Jan-09 23:13 
GeneralRe: ASP.NET 3.5 SP1 Server Side Viewstate Pin
Shog99-Jan-09 14:01
sitebuilderShog99-Jan-09 14:01 
QuestionCrystal Report Print Icon does nothing Pin
Anoop Brijmohun8-Jan-09 21:58
Anoop Brijmohun8-Jan-09 21:58 
QuestionDynamic populator Pin
umaheshchandra8-Jan-09 4:37
umaheshchandra8-Jan-09 4:37 
QuestionHelp writing a SharePoint Sequential WorkFlow Pin
Jakob Farian Krarup8-Jan-09 0:04
Jakob Farian Krarup8-Jan-09 0:04 
QuestionDoes anyone know of any good Dreamweaver alternatives? [modified] Pin
Kenny McKee7-Jan-09 15:59
Kenny McKee7-Jan-09 15:59 
AnswerRe: Does anyone know of any good Dreamweaver alternatives? Pin
Aman Bhullar7-Jan-09 17:56
Aman Bhullar7-Jan-09 17:56 
GeneralRe: Does anyone know of any good Dreamweaver alternatives? Pin
Kenny McKee7-Jan-09 18:15
Kenny McKee7-Jan-09 18:15 
AnswerRe: Does anyone know of any good Dreamweaver alternatives? Pin
Mohammad Dayyan8-Jan-09 10:16
Mohammad Dayyan8-Jan-09 10:16 
GeneralRe: Does anyone know of any good Dreamweaver alternatives? Pin
Kenny McKee8-Jan-09 15:05
Kenny McKee8-Jan-09 15:05 
Question, I need to a browse button to be able to open an image in the image control and also be able to get the path for the image... Can anyone help... Pin
akshayshirke117-Jan-09 3:00
akshayshirke117-Jan-09 3:00 
AnswerRe: , I need to a browse button to be able to open an image in the image control and also be able to get the path for the image... Can anyone help... Pin
SeMartens7-Jan-09 21:13
SeMartens7-Jan-09 21:13 
QuestionSEND EMAIL IN PHP Pin
Deepak C Lakshman6-Jan-09 8:50
Deepak C Lakshman6-Jan-09 8:50 
AnswerRe: SEND EMAIL IN PHP Pin
leckey6-Jan-09 9:42
leckey6-Jan-09 9:42 
AnswerRe: SEND EMAIL IN PHP Pin
Aman Bhullar6-Jan-09 20:29
Aman Bhullar6-Jan-09 20:29 
GeneralRe: SEND EMAIL IN PHP Pin
Deepak C Lakshman7-Jan-09 6:47
Deepak C Lakshman7-Jan-09 6:47 
AnswerRe: SEND EMAIL IN PHP Pin
Mohammad Dayyan8-Jan-09 10:14
Mohammad Dayyan8-Jan-09 10:14 
QuestionJavascript problem please help me? Pin
srinivassam5-Jan-09 22:44
srinivassam5-Jan-09 22:44 
AnswerRe: Javascript problem please help me? Pin
Aman Bhullar6-Jan-09 0:04
Aman Bhullar6-Jan-09 0:04 
AnswerRe: Javascript problem please help me? Pin
il_manti10-Jan-09 20:55
il_manti10-Jan-09 20:55 
QuestionDetermine Installed Apps on client pc Pin
Armandt__5-Jan-09 20:21
Armandt__5-Jan-09 20:21 

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.