I created a fancy box. It has a button like this -
onclick="parent.$.fancybox.close();" />
When the user clicks on 'Cancel' it calls - "parent.$.fancybox.close();".
But, I want to call "parent.$.fancybox.close();" from my C# code (code behind).
Any clue
Sergio AirapetianPosted Oct 31, 2012, 11:34 AM
Response.Write("");r pPosted Sep 27, 2012, 9:23 AM
It does not work for me when I use it within "User Control" (.ascx). My facybox code is in a control called - MyFancyControl.ascx and I use it with in a page called - MyFancyDisplyPage.aspx; then I call the display page from MyFancyCALLERPage.aspx.
If I move the entire code to a page instead of keeping it in a control, ScriptManager.RegisterStartupScript(this, GetType(), "" , "$.fancybox.close();", true); will work.
How can I close fancybox from a user control (.ascx)?
Thanks
Dorababu MekaPosted Sep 27, 2012, 8:08 AM
ScriptManager.RegisterStartupScript(this, GetType(), "" , "$.fancybox.close();", true);