我在一个已经发布的asp.net(VB)管理系统上的根目录,追加了另外一个文件ccc.aspx
ccc.aspx 代码如下:html>
<body>
<script language="VB" Runat="server">
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
dim getxuehao As String
dim getname As String
getxuehao=Request.QueryString["xh"]
if getxuehao="" then
response.write("参数传递错误!")
reponse.end
else
response.redirect("http://202.205.208.96/jwcliuyanban/?cufejwcnote_jiekou_name="&getxuehao&"&cufejwcnote_jiekou_type=0")
response.end
end if
End Sub
</script>
</body>
</html>
为什么同在根目录下,其他文件连接都可以访问,而访问ccc.aspx 却提示:
“/”应用程序中的服务器错误。
----------------------------------------------------
无法找到资源。
ccc.aspx 代码如下:html>
<body>
<script language="VB" Runat="server">
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
dim getxuehao As String
dim getname As String
getxuehao=Request.QueryString["xh"]
if getxuehao="" then
response.write("参数传递错误!")
reponse.end
else
response.redirect("http://202.205.208.96/jwcliuyanban/?cufejwcnote_jiekou_name="&getxuehao&"&cufejwcnote_jiekou_type=0")
response.end
end if
End Sub
</script>
</body>
</html>
为什么同在根目录下,其他文件连接都可以访问,而访问ccc.aspx 却提示:
“/”应用程序中的服务器错误。
----------------------------------------------------
无法找到资源。
response.redirect("http://202.205.208.96/jwcliuyanban/ccc.aspx?cufejwcnote_jiekou_name="&getxuehao&"&cufejwcnote_jiekou_type=0")
或者
response.redirect("./jwcliuyanban/ccc.aspx?cufejwcnote_jiekou_name="&getxuehao&"&cufejwcnote_jiekou_type=0")
根据实际目录结构修改一下
重新调试了一下, 大概是因为VB中用&符号引用变量,变量前后需要空格.
response.redirect("http://……/?cufejwcnote_jiekou_name="& getxuehao &"&cufejwcnote_jiekou_type=0")