1

Closed

UserControl Support

description

In order for lightbox.net to work when placed in a usercontrol the following changes need to be done.
 
  • [REMOVE] the following lines from lighbox.js:
     
    var fileLoadingImage = "lightboxNet/images/loading.gif";
    var fileBottomNavCloseImage = "lightboxNet/images/closelabel.gif";
     
     
  • [ADD] the following lines to the render function in ScriptManager.cs
     
    protected override void Render(HtmlTextWriter writer)
    {
        writer.Write(@"
        <script type='text/javascript'>
        <!--
                var fileLoadingImage = '" + ResolveUrl("~") + @"lightboxNet/images/loading.gif';        
                var fileBottomNavCloseImage = '" + ResolveUrl("~") + @"lightboxNet/images/closelabel.gif';
        // -->
        </script>
        ");
    }
     
     
    Why do this?
    A usercontrol may be used in many pages which have different path deeps. Allowing the scriptmanager to get the relative path to the images and write the javascript resolves this issue.
Closed Jun 5, 2007 at 9:30 PM by jglozano

comments

jglozano wrote Jun 4, 2007 at 5:26 PM

Sounds great! I will add this to the code and get it updated.

wrote Jun 4, 2007 at 5:27 PM

wrote Jun 5, 2007 at 9:30 PM

Resolved with changeset 23327.

wrote Jun 5, 2007 at 9:44 PM

wrote Feb 13, 2013 at 9:54 PM

wrote May 16, 2013 at 3:47 AM