ASP.NET (C#) Server.Execute Problem

T

The One of Need

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"]); %
 
A

Aaron Bertrand [MVP]

This newsgroup is tapped so I must be brief.

This newsgroup is the wrong newsgroup, so you should go to a more
appropriate one. For example,

news://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top