Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic ASPX Image Output for static ...xxx.jpg URL

Reply
Thread Tools

Dynamic ASPX Image Output for static ...xxx.jpg URL

 
 
Alex Maghen
Guest
Posts: n/a
 
      06-17-2010
I have a URL static URL that's being hit all the time:
"http://xyz.com/image.jpg". I want instead to put an ASPX file in that will
either output a dynamic JPEG itself or at least do a redirect to the JPEG I
want.

How can I create a configuration that will "replace"
"http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow INSIDE
the VS.NET Web Project and not in an IIS config because I want it to actually
work when I debug it through the VS IDE.

Thanks for your help.

Alex
 
Reply With Quote
 
 
 
 
behdad
Guest
Posts: n/a
 
      06-18-2010
On Jun 17, 11:47*am, Alex Maghen <(E-Mail Removed)> wrote:
> I have a URL static URL that's being hit all the time:
> "http://xyz.com/image.jpg". I want instead to put an ASPX file in that will
> either output a dynamic JPEG itself or at least do a redirect to the JPEG I
> want.
>
> How can I create a configuration that will "replace"
> "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow INSIDE
> the VS.NET Web Project and not in an IIS config because I want it to actually
> work when I debug it through the VS IDE.
>
> Thanks for your help.
>
> Alex

You can use HttpHandler this might help:
http://www.hanselman.com/blog/ASPNET...etsEasier.aspx
 
Reply With Quote
 
 
 
 
3P
Guest
Posts: n/a
 
      06-20-2010
Dnia 17-06-2010 o 17:47:56 Alex Maghen <(E-Mail Removed)>
napisał(a):

> I have a URL static URL that's being hit all the time:
> "http://xyz.com/image.jpg". I want instead to put an ASPX file in that
> will
> either output a dynamic JPEG itself or at least do a redirect to the
> JPEG I
> want.
>
> How can I create a configuration that will "replace"
> "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow
> INSIDE
> the VS.NET Web Project and not in an IIS config because I want it to
> actually
> work when I debug it through the VS IDE.
>
> Thanks for your help.
>
> Alex


You can insert
<img src="YourASPXPageReturningJpeg.aspx?parametersIfYo uLike"/>
 
Reply With Quote
 
3P
Guest
Posts: n/a
 
      06-22-2010
Dnia 21-06-2010 o 15:25:26 Russell <(E-Mail Removed)> napisał(a):

> On Jun 17, 11:47 am, Alex Maghen <(E-Mail Removed)> wrote:
>> I have a URL static URL that's being hit all the time:
>> "http://xyz.com/image.jpg". I want instead to put an ASPX file in that
>> will
>> either output a dynamic JPEG itself or at least do a redirect to the
>> JPEG I
>> want.
>>
>> How can I create a configuration that will "replace"
>> "http://xyz.com/image.jpg" with an ASPX? And I want to do this somehow
>> INSIDE
>> the VS.NET Web Project and not in an IIS config because I want it to
>> actually
>> work when I debug it through the VS IDE.
>>
>> Thanks for your help.
>>
>> Alex

>
> This is what ASHX handlers are for. You can map them to paths with an
> httpHandler mapping in your web config.
>
> <httpHandlers>
> <add verb="*" path="[whatever]" validate="true"
> type="[class,assembly]"/>
> </httpHandlers>


Yes You are right. Ashx handlers are better because they don't have
unnecessary page life cycle.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get from dynamic aspx to static html Rich S ASP .Net 5 01-19-2006 03:22 AM
Rewrite asp url as aspx url? =?Utf-8?B?VA==?= ASP .Net 5 07-24-2005 05:58 PM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
Dynamic control on aspx page, dynamic location Chris Thunell ASP .Net 3 07-21-2004 04:52 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments