Click here to Skip to main content
12,897,945 members (86,451 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Javascript jQuery
Hi everybody,
I want to a popup window by hyperlink click. Pupup window contain two textbox for username and password and a button. If username and password is incorrect then display
username or password not matching, on the popup window. If it is correct then redirect to another page.

I am new with javascript and jquery. Please help me.
Posted 11-Oct-12 7:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Ok this is pretty basic stuff but I am gonna try and give you some pointers rather than write the code for you. You have 2 ways of achieving this:

1) jquery UI: this is a total JavaScript based UI library that can help you create modal pop-ups. Have a look Here[^]

2) ASP.NET AJAX Control Toolkit: This is what I have used in the past and to some extent in the present as well. It has a control called ModalPopupExtender that displays a pop-up dialog, have a look Here[^]. You can build a panel containing the login controls as a separate user control and add that to the modal popup extender. You will then have to raise an event when the login is successful to redirect the user to the corresponding page but if the login is unsuccessful, keep the pop-up open and prompt the user for correct credentials.

However, I would not recommend using pop-ups because on mobile phones and smart phones pop-ups tend to be quite annoying. They tend to be a bit annoying even on desktops and hinder user experience. I would rather recommend using in-page login mechanism so the user interaction is consistent throughout. Unless, you can figure out a way to optimise pop-ups on a mobile phone.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100