Jul 14, 2009, 5:33 AM
Response.Redirect during AjaxMethod call
Hi,
Is it possible Response.Redirect during AjaxMethod call?
I try to do this.. but page still a same as before.. any ideas how to make response.redirect when I call AjaxMethod.
In couple words.. Its a login form.. in JavaScript I validate textboxes before it sends to server and then call server side method which provide authorization.. if its success - I must redirect user to another page
* function pso_login()
* {
* var llSuccess = true;
* var l1 = FRMLogin_Login1.validate();
* var l2 = FRMLogin_Password1.validate();
* var l3 = FRMLogin_Mandator1.validate();
* if (l1==false || l2==false || l3==false)
* llSuccess = false;
* if (llSuccess==true)
* Coolite.AjaxMethods.mmks_login();
* else
* Coolite.AjaxMethods.mmks_RequiredFieldsNotification();
* }
* *
*and my Ajax method looks
* <AjaxMethod()> _
* Public Sub mmks_login()
* Response.Clear()
* Response.Redirect("PenSolutionOffice.aspx")
* End Sub