0

I am working on DotnetNuke 7. I am creating Module using ASP.Net. I have created Module in Visual Studio 2015 and upload it as Extension in DotnetNuke(www.dnndev.me).

Everything is working fine except file management. I get stuck most time in case of file path.

I have .JS file. It has following code for Loading image. Now I don't know how to set path for it.

Following code will provide loading to screen. I have reviewed this in my demo ASP.Net project which is working perfectly. But when it comes to DotnetNuke, it doesn't work at all.

This is physical path of Loading F:/websites/dnndev.me/DesktopModules/CustomerDemo/Assets/Images/ajax-loading.gif

What path should I set in message:'<img src="http://localhost:60380/Assets/Images/ajax-loading.gif" align="">'?

blockUI: function (el, centerY) {
    var el = jQuery(el);
    el.block({
        message:'<img src="http://localhost:60380/Assets/Images/ajax-loading.gif" align="">',
        centerY: centerY != undefined ? centerY : true,
        css: {
            top: '10%'
        },
        overlayCSS: {
            backgroundColor: '#000',
            opacity: 0.05,
            cursor: 'wait'
        }
    });
},

1- What path should I set in above case?

2- Do I need to register this path anywhere in my project?

VDWWD
  • 35,079
  • 22
  • 62
  • 79
Nanji Mange
  • 2,155
  • 4
  • 29
  • 63

1 Answers1

0

You can use the path relative to the root of the DNN installation.

<img src="/DesktopModules/CustomerDemo/Assets/Images/ajax-loading.gif">
VDWWD
  • 35,079
  • 22
  • 62
  • 79
  • Thanks. You saved me. I have been trying since 3 hours. I have another question. Can you please suggest me? Do I need to register file anywhere to access it in DotnetNuke? i.e if I have JSON file in `Assests` folder, do I need to register it anywhere before accessing it? – Nanji Mange Jan 12 '17 at 11:51
  • No, you can access it the same way as the image. – VDWWD Jan 12 '17 at 12:50