How do I reference the module images directly in a content page (not a template page)? I have tried everything to find the correct path, but to no avail!
img runat=server src=[where am I?]/Images/nextpage.gif border=0
Ok the path is '/mycms/Modules/mymodule/Images/my.gif'
But I really want to generate the prefix '/mycms/Modules/mymodule/' dynamically.
So I what I am asking now is where is this path accessable in the API?
Hi,
If it is a server image control then the following should work:
'~/Modules/mymodule/Images/my.gif'
Failing that
string url = ResolveUrl('~/Modules/mymodule/Images/my.gif');
~ will get you to the base of your site.
Thanks dagda1,
I knew the answer would be simple, but if you don't know where to look then it can take some time to get there.
It was exactly the '~' I was looking for.
Is this an ASP specific 'thing', or just for this project. I come from a JSP background, so it's all a question of syntax for me at the moment. :-)
Thanks again.