469,314 Members | 2,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,314 developers. It's quick & easy.

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
Expand|Select|Wrap|Line Numbers
  1. if (TextBox2.Text.Equals(dr["member_name"].ToString()))
  2.       {
  3.  if (DropDownList1.Text == "Customer")
  4.          type = 1;
  5.          }
  6.         else
  7.         {
  8.         // Unauthorized
  9.         Error.Visible = true;
  10.         Error.Text = "Wrong username or password!";
  11.         }
  12.  
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...
Jun 14 '07 #1
2 2649
shweta123
692 Expert 512MB
Hi,

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

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
Expand|Select|Wrap|Line Numbers
  1. if (TextBox2.Text.Equals(dr["member_name"].ToString()))
  2.       {
  3.  if (DropDownList1.Text == "Customer")
  4.          type = 1;
  5.          }
  6.         else
  7.         {
  8.         // Unauthorized
  9.         Error.Visible = true;
  10.         Error.Text = "Wrong username or password!";
  11.         }
  12.  
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...
Jun 16 '07 #2
download dll for displaying error or use javascript
devensitapara@yahoo.com

Hi,

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

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by spencer | last post: by
6 posts views Thread by Will | last post: by
18 posts views Thread by Mickey Segal | last post: by
4 posts views Thread by loadspeed | last post: by
15 posts views Thread by Stig Brautaset | last post: by
5 posts views Thread by flamesrock | last post: by
25 posts views Thread by Nicholas Parsons | last post: by
7 posts views Thread by Scott | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.