ASP.NET (C#) Server.Execute Problem

Discussion in 'ASP General' started by The One of Need, Jan 24, 2004.

  1. This newsgroup is tapped so I must be brief. When
    using VB and ASP 3.0, I did the clever dynamic include
    method of using "Server.Execute", but switching to
    ASP.NET and C#, it does a myriad of things I generally
    don't want it to do. The variables I put in it sometimes
    are looked as null, or looks at it as a pass to ASP,
    (Response.Redirect isn't exactly what I want) so I'm just
    generally screwed. Here's basically what I'm trying to
    do:

    // This is where I want the content to be loaded.
    <%
    string conAct = Request["content"];
    if ( conAct != "" )
    {
    Server.Transfer(conAct);
    }
    if ( Request["content"] == "" )
    {
    Server.Execute(Request["/content/site/home.aspx"]);
    }
    %>

    // This is how the variable 'content' is loaded when a
    link is clicked.
    <a href="index.aspx?content=<% Response.Write
    (Request.ServerVariables["SERVER_HOST"]); %
    >/content/site/about.aspx">
     
    The One of Need, Jan 24, 2004
    #1
    1. Advertising

  2. Aaron Bertrand [MVP], Jan 24, 2004
    #2
    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. =?Utf-8?B?Q2h1Y2sgSGFlYmVybGU=?=

    Server.Execute against same page hangs ASP.NET

    =?Utf-8?B?Q2h1Y2sgSGFlYmVybGU=?=, Oct 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,061
    =?Utf-8?B?Q2h1Y2sgSGFlYmVybGU=?=
    Oct 7, 2004
  2. RedHair

    ASP.NET server.execute a UTF-8 file

    RedHair, Aug 1, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    483
    RedHair
    Aug 1, 2006
  3. Oscar
    Replies:
    2
    Views:
    3,048
    Oscar
    Sep 30, 2006
  4. =?Utf-8?B?QSBMb3Vpcw==?=

    Can't execute asp.net app using development web server

    =?Utf-8?B?QSBMb3Vpcw==?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    277
    =?Utf-8?B?QSBMb3Vpcw==?=
    Nov 1, 2006
  5. Savas Ates
    Replies:
    1
    Views:
    295
    Patrice
    Aug 17, 2004
Loading...

Share This Page