Ammar Iqbal
asked on
Displaying a modal pop up extender at the time of inserting a record in Details View Control
I need to pop up a Modal pop up extender, at the time of clicking a insert/save button in the Details View control.
ASKER
how to get this MyModal PopExtender id in the code behind. I am not getting it, and I can not access it either by DetailsView1.FindControl(" aaaa")
ASKER
I have managed to display the model pop up extender,on the click of the Save button when user is about to insert a new record. THe model pop up appears, but it does not disable the rest of the window.
<InsertItemTemplate>
<asp:Panel ID="pnlUserNotification" runat="server" CssClass="" OkControlID="btnOKUserNotifcation" CancelControlID="btnCancelUserNotification" DropShadow="true">
<div style="width:400px; height:400px; background-color:White">
Notify Users
<br />
<asp:Button runat="server" ID="btnOKUserNotification" Text="OK" />
<asp:Button runat="server" ID="btnCancelUserNotification" Text="Cancel" />
<table>
<tr>
<td><asp:Label ID="lblComm" runat="server" Text="Type:"></asp:Label></td>
<td><asp:DropDownList ID="i_communicationtype" runat="server" DataMember="CommunicationType" DataTextField="name" DataValueField="id" ></asp:DropDownList></td>
</tr>
<tr>
<td><asp:Label ID="lblRole" runat="server" Text="Role:"></asp:Label></td>
<td><asp:DropDownList ID="i_role" runat="server" DataMember="aspnet_roles" DataTextField="RoleName" DataValueField="RoleId"></asp:DropDownList></td>
<td><asp:Button ID="btnaddRole" runat="server" Text="Add Role" /></td>
</tr>
<tr>
<td><asp:Label ID="lbluser" runat="server" Text="User:"></asp:Label></td>
<td><asp:DropDownList ID="i_user" runat="server" DataMember="aspnet_Users" DataTextField="UserName" DataValueField="UserId"></asp:DropDownList></td>
<td><asp:Button ID="btnaddUser" runat="server" Text="Add User" /></td>
</tr>
</table>
<table>
<tr>
<td><asp:Label ID="lblTo" runat="server" Text="To:"></asp:Label></td>
<td><asp:TextBox ID="txtTo" runat="server" TextMode="MultiLine" Width="220"></asp:TextBox></td>
</tr>
</table>
</div>
</asp:Panel>
<asp:LinkButton ID="i_insert" runat="server" CausesValidation="False"
CommandName="Insert" CssClass="button" Visible="<%# IsAdmin %>" OnClick="btn_SaveClick">
<span class="ui-icon ui-icon-check"></span>Save
</asp:LinkButton>
<asp:LinkButton ID="i_cancel" runat="server" CausesValidation="False"
CommandName="Cancel" CssClass="button" Visible="<%# IsAdmin %>">
<span class="ui-icon ui-icon-arrowreturnthick-1-w"></span>Cancel
</asp:LinkButton>
<act:ModalPopupExtender ID="mpeUserNotification" runat="server" TargetControlID="i_insert"
OkControlID="btnOKUserNotification" CancelControlID="btnCancelUserNotification" PopupControlID="pnlUserNotification" DropShadow="true" >
</act:ModalPopupExtender>
</InsertItemTemplate>
Not sure what you mean; are you applying the right background CSS class for when the modalpopupextender is activated?
ASKER
I am not applying any csss for modal pop up extender.. is there any specific css class for this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
should i include this .css definition of modalPopUp in my orignal project css?
ASKER
and the fact is that I want to make The window disabled, so that it is inaccessible to the user as long as the modal pop up extender is active
You can add the CSS class anywhere it makes sense to do so for your solution; the original project CSS is as good a place as any. Once the CSS is class is defined and applied with the extender you should see the desired effect. Good luck!
ASKER
Hi Nash2334,
I have added one button control on the modal pop up extender, and ihave sone functionality in it, The problem is that when ever I click on this button, the pop up foes off , and the whole window gets enabled. What should I add to this button functioanlity ,so that the pop up remains until and unless, i click another "ok" button.
But not on this button
I have added one button control on the modal pop up extender, and ihave sone functionality in it, The problem is that when ever I click on this button, the pop up foes off , and the whole window gets enabled. What should I add to this button functioanlity ,so that the pop up remains until and unless, i click another "ok" button.
But not on this button
MyModalPopupExtender.Show(
MyModalPopupExtender.Hide(