Solved

popup control

Posted on 2009-05-10
12
566 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
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 …

947 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

17 Experts available now in Live!

Get 1:1 Help Now