Call ASP.NET file in ASP

J

Joel

Hey Everybody,

I have some older sites using ASP and I'm trying to find out a way to
call an .aspx page through an ASP page. I want to do something like
this.. where the asp.net page called returns something like an image
or text.

<a href="ad_links.aspx?id=test_corp">
<img src="ads.aspx?id=test_corp" / >
</a>

This would all run server-side on the page loading.

Thanks for the help
 
R

Rad [Visual C# MVP]

Hey Everybody,

I have some older sites using ASP and I'm trying to find out a way to
call an .aspx page through an ASP page. I want to do something like
this.. where the asp.net page called returns something like an image
or text.

<a href="ad_links.aspx?id=test_corp">
<img src="ads.aspx?id=test_corp" / >
</a>

This would all run server-side on the page loading.

Thanks for the help

As long as the asp.net application is not relying on authentication, you
should not get a problem using an aspx page to serve images
 
K

Kris Lankford

Joel,

You could just use create an handler that an get the image for you. Here is
a sample:

http://www.codeproject.com/aspnet/thumbnailer.asp

You should be able to set the source of your image to something like:
<img
src="http://aspnethost/imagehandler.ashx?imageid=k34lk22-se35kl-kjjlkj"...

It could find the image via the id and return the image in the response
stream. This method has been used many time to protect images. You could
also add other query string items to let the handler if it should send the
image based on criteria such as login, ip, etc...

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top