Solved

ModalPopUpExtender Login Control disappears for failed login

Posted on 2008-10-16
4
919 Views
Last Modified: 2013-12-26
This is my first post so I am sorry if I forgot some needed information:
We are using a ModalPopUpExtender to render our asp.net (Visual Basic) Login Control.  

When someone submits incorrect login information the popup modal disappears.  It should remain and show an authentication failed message.

0
Comment
Question by:showinggray
  • 2
4 Comments
 
LVL 18

Expert Comment

by:carlnorrbom
ID: 22738765
Hi,

Can You please post the code? Both the relevant markup and code behind would be helpful.

/Carl.
0
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 500 total points
ID: 22739084
There is a trick that you put an UpdatePanel inside the modalPopup, but then it requires pretty much another tricky step.

What you can do best is, after the page is postback and in the login function return false, this happens on server side. -> Inside that Login Button Click, when it's failed: open again the ModalPopup using .Show();

On your cs page (server side):

lblValid.Text = "Unable to authenticate user";
ModalPopupExtender mp = Page.FindControl("modalID") as ModalPopupExtender;
if(mp != null)
   mp.Show();

Hope this help


0
 

Author Closing Comment

by:showinggray
ID: 31506995
Thank you so much.    You pointed me in the right direction.   The mp.show() in a conditional in the pageLoad() in the site.mastser worked.
0
 
LVL 10

Expert Comment

by:jinn_hnnl
ID: 22741115
I am glad to help ^^
Hope you find the best place to trigger the Show() and doesn't  interfere the rest of the page ^^

JINN
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now