tags:

views:

257

answers:

1

I work on Asp.Net VS08 C#.Click on Button i want to show a model popup.containing the bellow controls.

<div>         
        <asp:Button ID="Button1" runat="server" Text="Close" />
        <asp:Button ID="Button2" runat="server" Text="Save" />
        <asp:Button ID="Button3" runat="server" Text="Search" />

    </div>

Popup close only click on close button .Click on Save button Save value but not close popup,click on search button search value but popup not close.

A: 

Assuming jQuery UI is included:

$('#myPopupControl').dialog( { modal: true } );

(where you put your controls inside of <div id="myPopupControl">...</div>

Use this to make the close button close the dialog:

$('#Button1').click( function() { $('#myPopupControl').dialog('close'); } );

It's up to you to do whatever you need when the user clicks Save or Search (your question doesn't give enough detail for me to be able to help with that).

MightyE
i want to show popup controls clicking on <asp:Button ID="Button1" runat="server" Text="show" /> button.Not on page lode. how to set z-Index of popup .i want to show popup bottom of the control.
Use just a regular button since the asp button will cause a post back. Then just bind a click event for that button and when clicked it does basically the first line of MigtyE's code and makes the dialog box.
chobo2
How to bind click event for a button?Show me syntax
Syntax$('#Button1').click(function({$('#myPopupControl').dialog('close'); } ); Not work.I have server side event for button2 and button3.After popup they also not work ,clicking on button2 not postback to server.Why? How to solve it?