Pop-Window alert for wrong user nameand password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • quethzal
    New Member
    • Jun 2007
    • 1

    Pop-Window alert for wrong user nameand password

    I am using Visual Web Developer 2005 for implementing a web site that requires login. However I made the check for the valid user name and password and show login error in my default.aspx.cs file by the code segment
    Code:
    if (TextBox2.Text.Equals(dr["member_name"].ToString()))
          {
     if (DropDownList1.Text == "Customer")
             type = 1;
             }
            else
            {
            // Unauthorized
            Error.Visible = true;
            Error.Text = "Wrong username or password!";
            }
    Error is a label created in default.aspx

    But i need a pop up screen for alerting user for wrong logins. I search but couldnt find a proper way for throwing alerts by pop-up's in asp. By the way I wanna learn how can implement this pop-up window in aspx file by a script and how or in aspx.cs file which valid user check is made by a C# code.I am newbie
    ın asp and thx for understanding and patience about my question...
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    You can call a javascript function to Throw a popup alert.
    <script language = "javascript ">
    function popup(url)
    {
    window.open(url );
    }
    </script>

    Originally posted by quethzal
    I am using Visual Web Developer 2005 for implementing a web site that requires login. However I made the check for the valid user name and password and show login error in my default.aspx.cs file by the code segment
    Code:
    if (TextBox2.Text.Equals(dr["member_name"].ToString()))
          {
     if (DropDownList1.Text == "Customer")
             type = 1;
             }
            else
            {
            // Unauthorized
            Error.Visible = true;
            Error.Text = "Wrong username or password!";
            }
    Error is a label created in default.aspx

    But i need a pop up screen for alerting user for wrong logins. I search but couldnt find a proper way for throwing alerts by pop-up's in asp. By the way I wanna learn how can implement this pop-up window in aspx file by a script and how or in aspx.cs file which valid user check is made by a C# code.I am newbie
    ın asp and thx for understanding and patience about my question...

    Comment

    • devensitapara
      New Member
      • Sep 2007
      • 5

      #3
      download dll for displaying error or use javascript
      devensitapara@y ahoo.com

      Originally posted by shweta123
      Hi,

      You can call a javascript function to Throw a popup alert.
      <script language = "javascript ">
      function popup(url)
      {
      window.open(url );
      }
      </script>

      Comment

      Working...