.net里面怎么用浏览器重定向

greytrack 2005-07-01 10:48:58
我想我的网页重定向(就是跳转到另外一个页面)
因为我不懂.net,所以用asp的语句写了
但是错了,请问如何改。错误代码如下
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30800: Method arguments must be enclosed in parentheses.
Source Error:

Line 1: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
Line 2: <% response.redirect "index.asp" %>

Source File: F:\ngszzx\News\index2.aspx Line: 2

...全文
95 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccghghgj 2005-07-02
  • 打赏
  • 举报
回复
因为 asp.net支持 <% ... %>这样的呈现函数
所以:
<scrtipt runat=server>
response.redirect("index.asp");
</script>


================================================================
此帖通过csdn小助手回复。
CSDN小助手是使用vb.net编写的CSDN论坛脱机“外挂”,她能够在
脱离IE的情况下使用Csdn论坛。程序只加载最核心的数据,所以显示更
快,产生的流量更小。

下载地址:http://qqwwee.com/csdn.rar
================================================================
renyu732 2005-07-02
  • 打赏
  • 举报
回复
Server.Transfer("Target.aspx")
Response.Redirect("Target.aspx")
Response.Write("<script>window.open('Target.aspx');</script>")
用得最多吧..
mba9001 2005-07-02
  • 打赏
  • 举报
回复
Page.RegisterStartupScript("aaa",@"<script language='javaScript'> window.open('aaa.aspx');</script>")

你把你熟悉的asp,js,vbs写到@后就行了.
ajieboy 2005-07-01
  • 打赏
  • 举报
回复
Response.Redirect("index.asp");

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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