How to dynamically bind fancybox to image button from code behind in page load, using register startup script,type iframe and the fancy box should display the url i passed to it, how can i achieve this
i have to navigate to the requested url in fancybox in imagebutton clientclick,
so i want to register clientscript in page load code behind
actually i have to show websites[another domain] in fancybox based on images clicked
i want all the bindings to be done in page load code behind since some sites are restricted, I would check database for user permissions and allow/deny site access
the site is shown in fancy box iframe
thanks,
This is my code:
string strscript = "@<script type='text/javascript'>$(document).ready(function(){$('#" + imgBtnID.ID + "').fancybox({'type': 'iframe','width':" + _strWidth + ",'height': " + _strHeight + ",'href':'" + _strURL + "'})});</script>"; ClientScript.RegisterStartupScript(typeof(ImageButton), "script_" + imgBtnID.ID, strscript, false);