在ASP +中包含一个文件 [英] Inluding a file in ASP+

查看:37
本文介绍了在ASP +中包含一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是ASP +的新手,我有Coldfusion和ASP的背景。


无论如何,我想做的是包含由varianle设置的文件所以


为phsedo代码道歉......

<%

dim myFileName

myFileName = ''pageToInclude.aspx''

%>


< html>

< body>

...

....

<%

包括myFileName

%> ;


< / body>

< / html>

任何人都知道,或者可以指向我的方向一些有用的教程


thankyou


Andrew

Hi I am very new to ASP+, i have a background in Coldfusion and ASP.

Anyway what i want to do is include a file set by a varianle so

apologies for the phsedo like code....
<%
dim myFileName
myFileName = ''pageToInclude.aspx''
%>

<html>
<body>
...
....
<%
include myFileName
%>

</body>
</html>
anyone know, or can point me in the direction of some useful tutorials

thankyou

Andrew

推荐答案

这是<! - #include file =" test.aspx" - >


这表示它被认为是遗产。在ASP.NET中,最好使用

a用户控件...(。ascx文件)


Patrice


-


" Andrew Price" <一个********** @ fusionworkshop.com>一个écritdansle message de

新闻:Cj *************** @ newsfe1-win.ntli.net ...
This is <!--#include file="test.aspx"-->

That said it is condisered as legacy. In ASP.NET, it is likely better to use
a user control... (.ascx file)

Patrice

--

"Andrew Price" <an**********@fusionworkshop.com> a écrit dans le message de
news:Cj***************@newsfe1-win.ntli.net...
嗨我是ASP +的新手,我有Coldfusion和ASP的背景。

无论如何我想做的是包含一个由varianle设置的文件所以

道歉对于类似phsedo的代码....
<%
dim myFileName
myFileName =''pageToInclude.aspx''
%>

< html>
< body>
..
...
<%
包含myFileName
%>

< / body>
< / html>

任何人都知道,或者可以指向我一些有用的教程的方向

thankyou

Andrew
Hi I am very new to ASP+, i have a background in Coldfusion and ASP.

Anyway what i want to do is include a file set by a varianle so

apologies for the phsedo like code....
<%
dim myFileName
myFileName = ''pageToInclude.aspx''
%>

<html>
<body>
..
...
<%
include myFileName
%>

</body>
</html>
anyone know, or can point me in the direction of some useful tutorials

thankyou

Andrew



Andrew Price写道:
Andrew Price wrote:
<%
包括myFileName
%>
<%
include myFileName
%>



你非常接近。 include语法是

<! - #include file =" pageToInclude.aspx" - >


BTW:很高兴看到ASP +在早期阶段就是ASP.NET的名称。这个

是文件扩展名是ASPX的原因,X是一个旋转45度的+号。


Anders Nor?s http://dotnetjunkies.com/weblog/anoras/


You are pretty close. The include syntax is
<!--#include file="pageToInclude.aspx"-->

BTW: Fun to see the ASP+ was the name of ASP.NET at an early stage. This
is why the file extension is ASPX the X is a + sign rotated 45 degrees.

Anders Nor?s
http://dotnetjunkies.com/weblog/anoras/


2005年2月1日星期二11:17:39 +0100,Anders Nor?s
< an ********** @ objectware.no>写道:
On Tue, 01 Feb 2005 11:17:39 +0100, Anders Nor?s
<an**********@objectware.no> wrote:
Andrew Price写道:
Andrew Price wrote:
<%
包括myFileName
%>
<%
include myFileName
%>


你很近。 include语法是
<! - #include file =" pageToInclude.aspx" - >

BTW:很高兴看到ASP +是ASP.NET的名称早期阶段。这就是文件扩展名为ASPX的原因,X是一个旋转45度的+符号。

Anders Nor?s http://dotnetjunkies.com/weblog/anoras/


You are pretty close. The include syntax is
<!--#include file="pageToInclude.aspx"-->

BTW: Fun to see the ASP+ was the name of ASP.NET at an early stage. This
is why the file extension is ASPX the X is a + sign rotated 45 degrees.

Anders Nor?s
http://dotnetjunkies.com/weblog/anoras/




Will用OPs变量进行programitically工作,它当然不会是ASP经典我不认为,虽然你总是可以

Server.Execute你出路如果我没记错的话。





-

Iain Norman | http://www.eliteforum.org

这篇关于在ASP +中包含一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆