在会员中心二次开发一个网页,使用官方的JS.Alert 和 Response.Redirect,都不能实现网页跳转,求解!
代码如下:
前台:test.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.master" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="User_test" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<asp:Button ID="Button1" runat="server" Text="Button" Height="110px" Width="217px" />
</asp:Content>
后台: test.aspx.cs
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Kesion.Components;
using Kesion.Publics;
public partial class User_test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("index.aspx", false);
// JS.Alert("网页跳转到会员首页","index.aspx");
}
}