Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Problem with <img> and an Http Handler that returns an image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alfonso Moreno - 23 Oct 2007 04:36 GMT
Hello,

- I have defined in web.config the http handler like this:

<handlers>
<add verb="*" path="ImageThumbnailer.ashx"
type="Thumbnailer.Handler.Thumbnailer, Thumbnailer.Handler"/>
...

- My http handler looks like:
namespace Thumbnailer.Handler
{
public class Thumbnailer : BaseHttpHandler
....

- I create dynamically with javascript, an image like this and the .src
property is defined also:

var img = document.createElement("img");
img.src = "ashx/ImageThumbnailer.ashx?img=../Images/Image01.jpg&size=72";
or
img.src = "ImageThumbnailer.ashx?img=../Images/Image01.jpg&size=72";

but the property is stored on the database like :

http://localhost:49573/SubdirCurrentPage/ashx/ImageThumbnailer.ashx?img=../Images/Image01.jpg&size=72

That is to say, the full path is prepended to the path of the current page.

Does anyone have any clue as what it is happening ?

Regards
Alfonso Moreno
Alfonso Moreno - 23 Oct 2007 04:46 GMT
> but the property is stored on the database like :

Sorry, this must be read...

but the property img.src is stored as this:

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.