Call ASP.NET file in ASP

  • Thread starter Thread starter Joel
  • Start date Start date
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
 
I am trying to envision the problem other than session (or authentication,
which is still session). If session is your issue, then try something like
the following:

http://searchvb.techtarget.com/tip/1,289483,sid8_gci951935,00.html
http://www.microsoft.com/japan/msdn/net/aspnet/converttoaspnet.aspx

If you are merely linking and using ASP.NET as an image server, you should
not have a major problem.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
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
 
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.
 
Back
Top