Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom control prevents asp code from running.

Status
Not open for further replies.

aimlion11yahoo

Instructor
Jul 20, 2006
42
US
I was using the following method to insert an include file that contained some ASP code. Everything was working fine. The line <%=request.servervariables("SCRIPT_NAME")%> returned the name of the page

Code:
	<body MS_POSITIONING="FlowLayout">
		<!-- #include virtual="includes/i_PageLayout_Top.ASP" -->

I replace the #include statement with the following custom control:

Code:
	<body MS_POSITIONING="FlowLayout">
		<cc1:CBDInclude id="CBDInclude1" FileName='C:\Inetpub\[URL unfurl="true"]wwwroot\Configurator\Includes\i_PageLayout_Top.ASP'[/URL]
			runat="server"></cc1:CBDInclude>

When using the custom control above, the ASP code does not execute.
<%=request.servervariables("SCRIPT_NAME")%> returns "<%=request.servervariables("SCRIPT_NAME")%>", not the name of the page.

Is there something I can do to fix this problem, or should I stick with the #include statement?

Thanks,
 
this really should be posted in the asp.net forum.

I would use a usercontrol and add it to your page. Include files can be problematic in .NET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top