一个语法问题

todaywlq 2004-06-10 10:39:23
我将下面的ASP语句
<%
.................
%>
<!-- #include file="simple_ns.asp" -->
<%
..................
%>

用VB.NET改写为
........................
Response.Write("<!-- #include file ='simple_ns.aspx'-->")
........................

我在运行时,总是没有结果,请问这么写有什么问题吗?
...全文
86 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dzliang21 2004-06-11
  • 打赏
  • 举报
回复
这相当于一个用户控件
todaywlq 2004-06-11
  • 打赏
  • 举报
回复
有没有人知道,指点一下。
gabriel1 2004-06-10
  • 打赏
  • 举报
回复
Response.Write("<!-- #include file ='simple_ns.aspx'-->")
意思是在服务器端运行Response.write操作,然后把"<!-- #include file ='simple_ns.aspx'-->"作为字符串发送到客户端浏览器,此时已经与服务器断开,根本无法请求simple_ns.aspx了。

<!-- #include file="simple_ns.aspx" -->
这种写法,在服务器运行时就将你的语句解析了(具体解析内容自己查查资料),运行时会去找包含文件
todaywlq 2004-06-10
  • 打赏
  • 举报
回复
多谢gabriel1,
可是我怎样才能在VB.NET的*.vb文件中实现这句代码<!-- #include file="simple_ns.aspx" -->的功能。

16,722

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧