?
Solved

Modalpopupextender Control

Posted on 2013-01-05
2
Medium Priority
?
234 Views
Last Modified: 2013-01-22
Hello,

I’m using the modalpopupextender control.
So far it’s working okay.  I can display it I then have a button within the panel that when clicked goes off and does some action.

Once the button is clicked the action is completed and the panel is hidden (I’m guessing because the page is reloaded).

I like to include a additional statement within the button code that based on a condition either completes actions, or updates the text of a label control within the panel.

So the question is how do I stop the panel from automatically closing?

TIA
0
Comment
Question by:andyw27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 38746423
<asp:Button id="btn1" runat="server" OnClientClick="javascript:return BtnClick();" Text="Button"></asp:Button>

function BtnClick()
{
           if(chck condition if change label....)
           {
                        // Write code to change label text
                        return false;
            }
            else
            {
                     // write code to post back
                     return true;
            }
}

Open in new window

0
 
LVL 2

Accepted Solution

by:
harshada_sonawane earned 2000 total points
ID: 38746571
try this:
protected void btn1_Click(object sender, EventArgs e)
    {
       if(condition1)
        {
          //change label
           popup.Show();
          }
    }

but panel sd not become visible false after post back
u can try this:

 <asp:Label ID="lblmsgpop" runat="server" Text=""> </asp:Label>
    <asp:ModalPopupExtender ID="PopEx" runat="server" BehaviorID="popmsg" TargetControlID="lblmsgpop"        PopupControlID="pnlPopup" />


<asp:Panel ID="pnlPopup" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

your poup controls
  </ContentTemplate>
    </asp:UpdatePanel>
</asp:Panel>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 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