Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Create thumbnail with the image class - how to display an ascx file within the modules directory?Create thumbnail with the image class - how to display an ascx file within the modules directory?
Previous
 
Next
New Post
3/24/2009 11:52 PM
 

I have to generate thumbnails from some images when my module displays a list with employee from our database. I already found tutorials like http://aspnet.4guysfromrolla.com/articles/012203-1.aspx and http://www.sitepoint.com/article/generating-asp-net-images-fly/ but all of them are working with something like this:

<img src="ShowImage.aspx?img=/images/BillGates.jpg" />

..where ShowImage.aspx is a web control which takes the URL to an image and then outputs the corresponding thumbnail. Now my problem is not writing the ShowImage.aspx, but where to save it or how it can be accessed when just storing it in the module folder as direct accessing ascx files in the DNN folders is forbidden (e.g. when storing the file in my modules folder, then <img src="myDNN/DesktopModules/myModule/ShowImage.aspx?img=billGates.jpg" /> won't work as it would have to directly access the ShowImage.aspx)

 
New Post
3/25/2009 4:32 AM
 

you might also want to checkout makethumbnail.ashx in UserDefinedTable, which tries to create thumbnails with a number of options.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/25/2009 7:07 AM
 

I tried it this way now, can anyone confirm if this is correct and robust? My thumbnailGenerator is in my module folder:

string url_thumbnailGenerator = "http://" + Request.Url.Host + ":" + Request.Url.Port + TemplateSourceDirectory + "/DisplayThumbnail.aspx";
// output> http://localhost:1234/myDNNinstall/DesktopModules/MyModule/DisplayThumbnail.aspx

where TemplateSourceDirectory is a DNN variable which (obviously?) returns the path to the module directory relative to http://server/DNN/. It works, but I am not sure, if there is a better way..

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Create thumbnail with the image class - how to display an ascx file within the modules directory?Create thumbnail with the image class - how to display an ascx file within the modules directory?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out