Link to home
Start Free TrialLog in
Avatar of andyw27
andyw27

asked on

Modalpopupextender Control

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
Avatar of Obadiah Christopher
Obadiah Christopher
Flag of India image

<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

ASKER CERTIFIED SOLUTION
Avatar of harshada_sonawane
harshada_sonawane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial