账号通
    

账号  

密码  

1876

查看

6

回复
主题:求助:网页不能跳转 [收藏主题] 转到:  
chase 当前离线

135

主题

15

广播

0

粉丝
添加关注
级别:一年级

用户积分:1939 分
登录次数:405 次
注册时间:2009/4/4
最后登录:2022/11/22
chase 发表于:2013/8/19 11:35:44   | 只看该作者 查看该作者主题 楼主 
做在线知识付费 选科汛云开店

在会员中心二次开发一个网页,使用官方的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");
}
}

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
chase 当前离线

135

主题

15

广播

0

粉丝
添加关注
级别:一年级

用户积分:1939 分
登录次数:405 次
注册时间:2009/4/4
最后登录:2022/11/22
chase 发表于:2013/8/19 11:49:22   | 只看该作者 查看该作者主题 沙发 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
chase 当前离线

135

主题

15

广播

0

粉丝
添加关注
级别:一年级

用户积分:1939 分
登录次数:405 次
注册时间:2009/4/4
最后登录:2022/11/22
chase 发表于:2013/8/19 11:57:33   | 只看该作者 查看该作者主题 藤椅 
科汛在线考试系统(NET)

使用

//this.Response.Write(" <script language=javascript>alert('网页跳转到会员首页');window.window.location.href='index.aspx';</script> ");

   

this.Response.Write("<script>alert('网页跳转到会员首页2!');window.opener.location.href=window.opener.location.href;</script>");



都不能跳转。

郁闷了

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2013/8/19 13:07:53   | 只看该作者 查看该作者主题 板凳 
科汛智能建站系统

试试这样:

this.Response.Write("<script>alert('网页跳转到会员首页!');window.open('index.aspx');</script>");



 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
chase 当前离线

135

主题

15

广播

0

粉丝
添加关注
级别:一年级

用户积分:1939 分
登录次数:405 次
注册时间:2009/4/4
最后登录:2022/11/22
chase 发表于:2013/8/19 13:27:27   | 只看该作者 查看该作者主题 报纸 
科汛在线考试系统(NET)

谢谢老大。

这样可以的。



只是窗口没有官方自带的JS.Alert 美观,有点可惜了...

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2013/8/19 17:25:21   | 只看该作者 查看该作者主题 地板 
做在线知识付费 选科汛云开店

可以试试这样:



JS.AlertDoFun("网页跳转到会员首页","top.location.href='../index.aspx';");

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
chase 当前离线

135

主题

15

广播

0

粉丝
添加关注
级别:一年级

用户积分:1939 分
登录次数:405 次
注册时间:2009/4/4
最后登录:2022/11/22
chase 发表于:2013/8/19 21:07:34   | 只看该作者 查看该作者主题 7楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行1.19141秒 powered by KesionCMS 9.0