Re: How I can get Image Path from the Gallery Browser of Image Gallery

  •  12-26-2013, 10:56 PM

    Re: How I can get Image Path from the Gallery Browser of Image Gallery

    Dear narendrababu,

     

    This is js code

    you need to define a global variable for the virtual application path in asp.net page

    For example:

    var _siteroot = '<%= YOUR CODE TO GET SITE ROOT PATH%>';  // not contains '/'

     

    then, deal with photo path

     

    var url  = Photo.Url;

    var arr  = url.split("/");

    //Remove Photo Name

    arr.splice(arr.length-1,1);

    //Remove site root

    if(_siteroot && arr[0].toLowerCase() == _siteroot.toLowerCase())

          arr.splice(0,1);

    var result = arr.join("/"); 

     

    Regards,

    Jeff 

View Complete Thread