472,110 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

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 2758
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.