Thursday, July 3, 2008

ModalPopupExtender Ajax

It's ModalPopupExtender Control
---------------------------------------------------------------------------
In the Model PopUp Extender control has TargetControlD in this property you have to pass that Button Control ID on which you want to open the popup.
and popupControlID Property you pass the which control ID which you want to Make the Popup like here Panal control.
and On CancelContolID you have to pass the cancel button ID by which Popup will close.

Note-: If you want when Popup is opened your back ground opacity reduced 70%.
You have to pass the modalBackground css in the ModelPopupExtender property BackgroundCssClass.
----------------------------------------------------------------------
Here is CSS-:

.modalBackground {
background-color:Gray;
filter:alpha(opacity=70);
opacity:0.7;
}
-----------------------------------------------------------------------------

ajaxToolkit:ModalPopupExtender ID="mpeAddForum" runat="server"
TargetControlID="btnAddModerator"
PopupControlID="pnlModerator"
BackgroundCssClass="modalBackground"
DropShadow="false"
CancelControlID="btnCancelPopup" EnableViewState="false" />
----------------------------------------------------------------------------------
asp:Panel ID="pnlModerator" runat="server" Width="400px" Height="250px" >
table >
tr>
td> Enter User Name

asp:TextBox ID="txtname" runat="server">

/td>
/tr>
tr>
td>
asp:Button ID="btnPopupSaveModerator" runat="server" Text="Save" onclick="btnPopupSaveModerator_Click" />
asp:Button ID="btnCancelPopup" runat="server" Text="Cancel"/>
/td>
/tr>
/table>
/asp:Panel>


here some invalid tags---please ignore it ....

No comments: