Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Ajax
Hi my dears ,
 
I have try with Ajax ModalPopupExtender in ASP.NET , but I want close it (or hidden) by mouse click on outside it in body of page , such as Facebook photos show ..
note : now I can close ModalPopupExtenderby only by cancel button ..
 
I hope your help ...
 

This my try :
 

 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
 
    <link href="Styles/panal.css" rel="stylesheet" type="text/css"/>
 
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<asp:LinkButton ID="LinkButton1" runat="server">Please click</asp:LinkButton><br />
<br />
<div>
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" Width="233px" >
<p> السلام عليكم </p>
<div align="center">
<asp:Button ID="OkButton" runat="server" Text="OK" PostBackUrl="~/Home.aspx" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" PostBackUrl="~/Default.aspx" />
</div>
</asp:Panel>
<br />
 
<cc1:ModalPopupExtender ID="ModalPopupExtender1"  runat="server" 
        TargetControlID="LinkButton1" PopupControlID="Panel1" 
BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="OkButton" CancelControlID="CancelButton" />
 
</div>
</form>
</body> 
 
</html>
 
Posted 16-Jan-13 5:40am
klm_klm499
Edited 16-Jan-13 5:42am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

please help meee .......................
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Here is the answer[^]
Next time please don't post your comments as a reply.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hello klm_klm,
 

Please go through link
 
1.
<a href="http://stackoverflow.com/questions/11028703/how-to-close-ajax-modal-popup-with-clicking-outside">http://stackoverflow.com/questions/11028703/how-to-close-ajax-modal-popup-with-clicking-outside</a>[<a href="http://stackoverflow.com/questions/11028703/how-to-close-ajax-modal-popup-with-clicking-outside" target="_blank" title="New Window">^</a>]
 

2.
<a href="http://www.webcodeexpert.com/2014/04/example-to-close-ajax.html#.U56L8ijLM70">http://www.webcodeexpert.com/2014/04/example-to-close-ajax.html#.U56L8ijLM70</a>[<a href="http://www.webcodeexpert.com/2014/04/example-to-close-ajax.html#.U56L8ijLM70" target="_blank" title="New Window">^</a>]
 

Let me know if you have any further query.
 
Please, go through above link.
 
If its your answer, please mark as solution.
 
Best of luck for hunting solutions.
 
Thank you.
 
Regards,
 
Manoj Kalla
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 16 Jun 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100