473,574 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pop-Window alert for wrong user nameand password

1 New Member
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 2857
shweta123
692 Recognized Expert Contributor
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
devensitapara
5 New Member
download dll for displaying error or use javascript
devensitapara@y ahoo.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

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

Similar topics

1
2242
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor) print 'after pop...', dirStackMinor
6
23191
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the entire word?
13
1730
by: nospam | last post by:
DEAR MICROSOFT: WOULD YOU PLEASE put up a web page showing the price list of EXPECTED COSTS for MOM & POP when choosing between MySql/PHP and .NET. FIRST: Show INITIAL COSTS for like a 5-10 page web site that can take a few orders... INCLUDE THE ISP charges..developer, software...
18
2875
by: Mickey Segal | last post by:
On comp.lang.java.programmer we are discussing problems created for Java programs by pop-up blockers (in the thread "showDocument blocked by new microsoft pop-up blocker"). Our problem is that Java's showDocument method, which opens new browser windows, is blocked by some pop-up blockers. The showDocument method is blocked even if the user...
4
1245
by: loadspeed | last post by:
hi there i am not sure if it's late at night, or that i am being thick, or that i am being thick and it's late at night... but i am trying to create a pop-up that scales to it's content i.e. say i have several different sized images opening into a pop-up, but they are using one pop-up template, i want that pop-up to resize to each...
15
4141
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: struct node { struct node *next; void *data; };
5
16823
by: flamesrock | last post by:
Hi, It's been a while since I've played with python. My question is... whats the best way to pop a random item from a list?? -Thanks
25
4182
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data structure. A stack is defined to be an "ordered"...
7
24930
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets assume its not a built in sequence> 'example'
0
7814
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8067
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7826
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5307
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3748
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3756
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2252
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.