Solved

popup control

Posted on 2009-05-10
12
569 Views
Last Modified: 2013-11-08
0
Comment
Question by:KaranGupta
  • 7
  • 5
12 Comments
 
LVL 9

Expert Comment

by:tetorvik
ID: 24351521
You can use popupControl.Show(); or popupControl.Hide(); to control popup control visibility on server-side. You can do the same with javascript with popupControl.show(); or popupControl.hide();
0
 

Author Comment

by:KaranGupta
ID: 24351643
Hi

I have used following code(code in code section)

But I didn't see anything like

Show() or Hide() in code behind
<asp:TextBox ID="txtDatabaseEntry" runat="server"></asp:TextBox>    
    <asp:Panel ID="loginPanel" runat="server" Style="display: none">
        <asp:Login ID="LoginCtrl" runat="server" FailureText="Identifiant incorrect ! Essayez ? nouveau..."
            LoginButtonText="Login" PasswordLabelText="Password" PasswordRequiredErrorMessage="Le mot de passe est requis."
            RememberMeText="Remember Me" TitleText="S'identifier"
            UserNameLabelText="User Name" UserNameRequiredErrorMessage="L'email est requis."
            CreateUserText="S'enregistrer" CreateUserUrl="/Register.aspx" PasswordRecoveryText="Mot de passe oubli? ?"
            PasswordRecoveryUrl="/PasswordRecovery.aspx" />
    </asp:Panel>
    <ajaxToolkit:PopupControlExtender ID="PopEx" runat="server" TargetControlID="txtDatabaseEntry"
        PopupControlID="loginPanel" Position="Left" />

Open in new window

0
 
LVL 9

Expert Comment

by:tetorvik
ID: 24351684
If there is no specifig condition to check prior opening/closing the popup you can use:

TargetControlID - The ID of the element that activates the modal popup  (for example login loginHyperLink like in your example)
CancelControlID - The ID of the element that cancels the modal popup



<ajaxToolkit:PopupControlExtender ID="PopEx" runat="server" TargetControlID="loginHyperLink"
        PopupControlID="loginPanel" Position="Left" CancelControlID="cancelButton" />

Open in new window

0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
LVL 9

Expert Comment

by:tetorvik
ID: 24351698
PopEx.Show(); and PopEx.Hide(); should exits on you page / user control that contains the PopupControlExtender control .
0
 

Author Comment

by:KaranGupta
ID: 24351933
Hi

It is necessary to put popup extender in the <asp:updatepanel

because I am getting an error

"The control with ID 'PopEx' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
"
0
 
LVL 9

Expert Comment

by:tetorvik
ID: 24352028
To enable ASP.NET Ajax in general on your page you'll need to have <asp:ScriptManager ID="ScriptManager1" runat="server" /> on your page.
You can use popup control without updatepanel, but the scriptmanager is required.
0
 

Author Comment

by:KaranGupta
ID: 24352054
Hi

I have used script manager now it is working

but still I don't find show method

can you help me with that
0
 
LVL 9

Expert Comment

by:tetorvik
ID: 24352112
Can you  post your aspx and aspx.cs file?
Do you see your PopEx in code-behind at all?
0
 

Author Comment

by:KaranGupta
ID: 24352274
Hi

It is working fine now

by using Modalpopup extender

but when the modal popupextender opens
I can still click on the buttons of the webpage behind the pop up control

Is there any way to disable them
0
 
LVL 9

Expert Comment

by:tetorvik
ID: 24352308
it should be modal by default. are you using frames?
0
 

Author Comment

by:KaranGupta
ID: 24352316
No I am not using frames

Can we disable the Previous background

0
 
LVL 9

Accepted Solution

by:
tetorvik earned 500 total points
ID: 24352372
the main screen should be grayed by default. see the sample from http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx
once clicking the link "Click here to change the paragraph style" it opens a modal popup and there is no way to click other screen elements before the modal dialog is closed.

You can also download ajax control toolkit with source code and samples (http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=16488).  There you can see for example how the link above is implemented.  
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I run RAW complex query's with Entity Framework Core 1 38
SSIS On fail action 5 38
how to just get time from a date 6 34
Visual Studio npm 1 12
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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