Call ASP.NET file in ASP

Discussion in 'ASP .Net' started by Joel, Apr 14, 2007.

  1. Joel

    Joel Guest

    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
     
    Joel, Apr 14, 2007
    #1
    1. Advertising

  2. 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!
    *********************************************
    "Joel" <> wrote in message
    news:...
    > 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
    >
     
    Cowboy \(Gregory A. Beamer\), Apr 14, 2007
    #2
    1. Advertising

  3. On 13 Apr 2007 16:30:47 -0700, Joel wrote:

    > 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
    --
    Bits.Bytes
    http://bytes.thinkersroom.com
     
    Rad [Visual C# MVP], Apr 14, 2007
    #3
  4. 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.

    "Joel" <> wrote in message
    news:...
    > 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
    >
     
    Kris Lankford, Apr 14, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry Woods
    Replies:
    2
    Views:
    945
    Larry Woods
    Oct 22, 2004
  2. Hoss
    Replies:
    5
    Views:
    5,249
    rednael
    Sep 15, 2008
  3. Tony Cheng
    Replies:
    4
    Views:
    444
    Kevin Spencer
    Feb 22, 2005
  4. Peri
    Replies:
    2
    Views:
    3,019
  5. =?Utf-8?B?QW5hbmRoaQ==?=

    How to call a ASP.net file from ASP file

    =?Utf-8?B?QW5hbmRoaQ==?=, Apr 19, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    330
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 19, 2007
Loading...

Share This Page