[CLOSED] How to redirect after login

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] How to redirect after login

    Hi,
    Can you tell me how to redirect after login. I'm using ASP.NET MVC. This is my code in Controllers
    [AllowAnonymous]
            public Ext.Net.MVC.AjaxResult ExtLogin()
            {
                var username = HttpContext.Request["username"];
                var password = HttpContext.Request["password"];
                var returnUrl = HttpContext.Request["ReturnUrl"];
                if (WebSecurity.Login(username, password) == WebSecurity.MembershipLoginStatus.Success)
                {
                    string script = "window.location.replace('" + returnUrl + "')";
                    return new Ext.Net.MVC.AjaxResult { Script = script };
                }
                else
                {
                    return new Ext.Net.MVC.AjaxResult { ErrorMessage = "The username or password is incorrect" };
                }
    
            }
    Last edited by Daniil; Jun 21, 2012 at 9:53 PM. Reason: [CLOSED]

Similar Threads

  1. login & response.redirect
    By svk in forum 1.x Help
    Replies: 2
    Last Post: Jan 17, 2013, 6:10 AM
  2. [CLOSED] about:After login Redirect?
    By wkcode in forum 1.x Help
    Replies: 6
    Last Post: Jan 15, 2013, 5:12 AM
  3. [CLOSED] Differences between X.Redirect and Response.Redirect
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 10, 2012, 4:29 PM
  4. Problem to Redirect To Login Page
    By aniketyadav7 in forum 1.x Help
    Replies: 6
    Last Post: Feb 23, 2012, 7:29 AM
  5. login problem with Ext Login Control
    By Bruce2010 in forum 1.x Help
    Replies: 1
    Last Post: Nov 30, 2010, 4:35 PM

Tags for this Thread

Posting Permissions