Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
How to set a pop up screen with checkbox on clicking a button or a link in asp.net with c#?


I want to generate a pop up screen with checkbox on clicking a button or a link. If the checkbox in the pop up window is checked user must be able to save and if not the pop up must remain there.

What I have tried:

I tried with a div and a pop up screen using window.open. But wasn't able to set the controls in the pop up screen.
Posted
Updated 17-Feb-16 22:02pm

1 solution

Hi
Pls try ajax tool kit's modal popup extender.You can add checkbox inside it.

ASP.NET
<asp:Button ID="btnId1" runat="server" Text="button" />
 <ajax:ModalPopupExtender
ID="ModalPopupExtender1"
DropShadow="true"
PopupControlID="Panel1"
TargetControlID="btnId1"
BehaviorID="ModalPopupExtender1"
runat="server">
</ajax:ModalPopupExtender>
  <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup"  >
 <asp:CheckBox ID="chkasdf" runat="server" AutoPostBack="true" 
          oncheckedchanged="chkasdf_CheckedChanged" />
  </asp:Panel>



Then inside checkbox checkchanged event u can do your stuffs

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900