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.0CC2:DynamicImage Modification?CC2:DynamicImage Modification?
Previous
 
Next
New Post
9/16/2008 8:36 PM
 



I am working with a custom image control that I would like to modify to display images using an ImageUrl rather than ImageBytes.  This is the custom control:

<%@ Register Assembly="DynamicImage" Namespace="MsdnMag" TagPrefix="cc2" %>

I presently am not working with the code behind, luckily all the magic seems to be taking place within the .ascx file.  I have added another column to the components SQL tableset named 'ImageUrl'.  Here's a sample of the .ascx code:

<cc2:DynamicImage ID="DynamicImage1" runat="server" ImageBytes="<%# Container.ThumbnailImage %>" Visible="<%# Container.HasImage %>" AlternateText="<%# Container.ProductName %>" />

I have tried replacing the 'ImageBytes=...' with the following variations:

ImageUrl="<%# Container.ImageUrl %>"
ImageUrl="<%# ImageUrl %>"
ImageUrl="<%# Bind("Container.ImageUrl") %>"
ImageUrl="<%# Bind("ImageUrl") %>"
ImageUrl="<%# Eval("Container.ImageUrl") %>"
ImageUrl="<%# Eval("ImageUrl") %>"

Shouldn't I be able to add a column to tableset, as mentioned above, and replace 'ImageBytes' binds with an equivalent 'ImageUrl' bind that will display image using the Url rather than dynamically storing bytes of data within the .ASCX?

Feedback Appreciated.

 
New Post
9/17/2008 9:35 AM
 

Although I am not specifically familiar with that particular dynamic image control, my guess is that unless the control already exposes an ImageUrl property to which you can databind the path or url of the image file, you would not be able to modify the control in this manner.

If the control does not already expose an ImageUrl property, it's codebehind would have to be modified, perhaps extensively, to expose this new property, load the image from the file path or url rather than from a byte array.

My ImageEditor project available in the DNN Forge includes a dynamic image handler (DynamicImage.ashx) which can load the image to be displayed from either a file path or from a cached image. Perhaps this will be of help to you.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0CC2:DynamicImage Modification?CC2:DynamicImage Modification?


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