点击一个按钮,能够超级链接的作用吗?
解决方案 »
- 有没有可以在网页里播放MP3的播放器哈?
- 如何切换Iframe的网址
- 动态生成file控件,到服务端获取问题?
- 关于WEB下异常处理
- windows 2008里 iis7里奇怪的问题
- 50分求完整打包安装类(C#+sql2000+写web.config),收到就给分
- 设计Session与Cookie共同使用的问题?(一个php程序员学习asp.net的感想)
- 紧急求助!怎样使用C#-Asp.net实现文件上传,怎样修改已有Accesss数据库中的用户登陆密码?
- 关于从DataGrid导出报表的问题?急
- 大虾们帮帮忙,把数据从程序里导入到Excel里,Excel里面出现的是乱码,这个问题怎么解决???
- 更改namespace以后,compile 没出现问题 ,但运行是出现"未能加载类型", 为何??
- asp.net中用C#写的邮件接收程序
Response.Redirect("abc.aspx");
或Response.Wirte("<script>window.open('abc.aspx')</script>") //这是新开窗口~
<asp:button id="Button1" style="Z-INDEX: 139; LEFT: 696px; POSITION: absolute; TOP: 264px" onclick="Response.Redirect(WebForm2.aspx);"
tabIndex="16" runat="server" Width="64px" Text="下一步"></asp:button>可我这样写会出错呀。
“/orderformInput”应用程序中的服务器错误。
--------------------------------------------------------------------------------编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS1026: 应输入 )源错误: 行 59: <FONT id="FONT1" face="宋体" runat="server">
行 60: <asp:label id="Label1" style="Z-INDEX: 100; LEFT: 423px; POSITION: absolute; TOP: 32px" runat="server"
行 61: Font-Size="X-Large" Height="32px" Width="440px">主订单输入</asp:label><asp:button id="Button1" style="Z-INDEX: 139; LEFT: 696px; POSITION: absolute; TOP: 264px" onclick="Response.Redirect(WebForm2.aspx);"
行 62: tabIndex="16" runat="server" Width="64px" Text="下一步"></asp:button><INPUT onkeypress="onlyNum()" id="Textbox11" onblur="filterInput()" onkeyup="filterInput()"
行 63: style="Z-INDEX: 138; LEFT: 819px; WIDTH: 104px; POSITION: absolute; TOP: 107px; HEIGHT: 23px" tabIndex="4" onbeforeupdate="filterPaste()" type="text" size="12"
源文件: d:\inetpub\wwwroots\orderformInput\WebForm1.aspx 行: 61
而onclick好象是在前台执行吧,后台代码怎么可能在前台执行呢?如果你用Response.Redirect(WebForm2.aspx);
你可以把它放到
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Redirect(WebForm2.aspx)
End Sub你也可以不用提交页面,在前台执行
你在PAGEˍLOAD中添加
Button1.Attributes.Add("onclick", "javascript:window.location=’ WebForm2.aspx’”);
会出现错误的提示:Wirte”不是“System.Web.HttpResponse”的成员。 wangdequan1024(紫夜)你知道为什么???麻烦解决
private void Page_Load(object sender, System.EventArgs e)
{
Button1.Attributes["onclick"]="<script>window.open('WebForm1.aspx')</script>";
}