Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
WebAsyncRefreshPanel and System.Web.UI.WebControls.Login
posted

I'm using the Microsoft Login component on my login page. After a user is logged in it will not redirect to another page defined in the DestinationPageUrl or using a Server.Redirect in the Loggedin event.

It just sits there...

If I turn off the Warp Panel it works fine.

 Any suggestions? 

 

Parents
No Data
Reply
  • 0
    Offline posted

    The following code example uses a Login control to provide a UI for logging in to a Web site.

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.ComponentModel" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">www.w3.org/.../xhtml1-transitional.dtd">

    <script runat="server">
    bool IsValidEmail(string strIn)
    {
    // Return true if strIn is in valid email format.
    return Regex.IsMatch(strIn, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
    }

    void OnLoggingIn(object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
    {
    if (!IsValidEmail(Login1.UserName))
    {
    Login1.InstructionText = "Enter a valid email address.";
    Login1.InstructionTextStyle.ForeColor = System.Drawing.Color.RosyBrown;
    e.Cancel = true;
    }
    else
    {
    Login1.InstructionText = String.Empty;
    }
    }

    void OnLoginError(object sender, EventArgs e)
    {
    Login1.HelpPageText = "Help with logging in...";
    Login1.PasswordRecoveryText = "Forgot your password?";
    }
    </script>

    <html xmlns="">http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>ASP.NET Example</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:Login id="Login1" runat="server"
    BorderStyle="Solid"
    BackColor="#F7F7DE"
    BorderWidth="1px"
    BorderColor="#CCCC99"
    Font-Size="10pt"
    Font-Names="Verdana"
    CreateUserText="Create a new user..."
    CreateUserUrl="newUser.aspx"
    HelpPageUrl="help.aspx"
    PasswordRecoveryUrl="getPass.aspx"
    UserNameLabelText="Email address:"
    OnLoggingIn="OnLoggingIn"
    OnLoginError="OnLoginError" >
    <TitleTextStyle Font-Bold="True"
    ForeColor="#FFFFFF"
    BackColor="#6B696B">
    </TitleTextStyle>
    </asp:Login>

    </form>
    </body>
    </html>

    UNO Online returns with a slew of new features, including video chat support and a brand-new theme system that adds even more fun!

Children
No Data