页面验证权限时不显示aspx页面中内容 进行页面级权限(是否有访问)验证时,在cs页面的pageload中写验证函数,验证函数在页面绑定数据前先验证,可弹出不可访问框的背影下 还存在aspx页面的静态控件内容 现在我想让弹出不访问框下显示是空白 请问怎么做?谢谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Response.Clear(); Response.End();这样能做到吗 那你把静态控件设置为runat="server",真心没怎么明白你想要什么东西 验证提示 我用的就是js的alert('没有权限!')window.history.go(-1) using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class TeachresSearch_Index : BasePage{ protected void Page_Load(object sender, EventArgs e) { Response.Expires = -1; this.Page.Title = new XJBLL.xj_SystemSet().GetModel().up_size.ToString(); if (!new PublicMethods().bijiao(new XJBLL.xj_Juese().GetModel(UserInfo.ui_juese_id).j_ss, new XJBLL.xj_CanshuInfo().GetModelId(" and ci_cl_id=20 and ci_name='导航中资源搜索' ").id.ToString())) { AjaxScript(this, "alert('没有资源搜索的权限!');window.history.go(-1);"); } }}aspx页面<table width="860px" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td style="width: 860px;" align="left" valign="top" class="td_bg"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="width: 860px; height: 187px;"> <iframe frameborder="0" scrolling="no" width="860px" height="187px" src="../Top.aspx"> </iframe> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="width: 860px; height: 28px;"> <iframe frameborder="0" scrolling="no" width="860px" height="28px" src="../Search.aspx"> </iframe> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" bgcolor="#FFFFFF"> <iframe name="main" frameborder="0" scrolling="no" onload="this.height=this.contentWindow.document.body.scrollHeight+60;" width="100%" src="SearchCondition.aspx"></iframe> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="width: 860px; height: 88px;"> <iframe frameborder="0" scrolling="no" width="860px" height="88px" src="../Bottom.aspx"> </iframe> </td> </tr> </table> </td> </tr> </table> 无权限时候 Write(弹出层) 然后 Response.End(); 不要clear Rsponse.Write("<script>alert('没有资源搜索的权限!');window.history.go(-1);</script>");Response.End(); 谢谢你啊 你的答复 对极了我验证弹出框用的是这个ScriptManager.RegisterStartupScript(page, page.GetType(), Guid.NewGuid().ToString(), "alert('没有资源搜索的权限!');window.history.go(-1);", true); 可能是这个出现问题了 asp:repeater中把值传给变量 httpwebrequest能不能在目标网站创建COOKIES,并且下次直接访问目标网站时,能读取这个COOKIE 关于用户控件拖到页面的问题 找兼职美工 高分求教 出个题目,100分,大家踊跃参加哦,人多再加分 域名查询系统.返回是否能注册 asp.net程序做好了,服务器上framework也装好了,不知水晶报表如何装 ASP.NET中TOList转成JSON格式 为什么我总连不上数据库啊?谢谢指教 GridView绑定实体集合问题 求方正教学管理系统源码
Response.End();
这样能做到吗
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class TeachresSearch_Index : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Expires = -1;
this.Page.Title = new XJBLL.xj_SystemSet().GetModel().up_size.ToString();
if (!new PublicMethods().bijiao(new XJBLL.xj_Juese().GetModel(UserInfo.ui_juese_id).j_ss, new XJBLL.xj_CanshuInfo().GetModelId(" and ci_cl_id=20 and ci_name='导航中资源搜索' ").id.ToString()))
{
AjaxScript(this, "alert('没有资源搜索的权限!');window.history.go(-1);");
}
}
}aspx页面
<table width="860px" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 860px;" align="left" valign="top" class="td_bg">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 860px; height: 187px;">
<iframe frameborder="0" scrolling="no" width="860px" height="187px" src="../Top.aspx">
</iframe>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 860px; height: 28px;">
<iframe frameborder="0" scrolling="no" width="860px" height="28px" src="../Search.aspx">
</iframe>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<iframe name="main" frameborder="0" scrolling="no" onload="this.height=this.contentWindow.document.body.scrollHeight+60;"
width="100%" src="SearchCondition.aspx"></iframe>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 860px; height: 88px;">
<iframe frameborder="0" scrolling="no" width="860px" height="88px" src="../Bottom.aspx">
</iframe>
</td>
</tr>
</table>
</td>
</tr>
</table>
Rsponse.Write("<script>alert('没有资源搜索的权限!');window.history.go(-1);</script>");
Response.End();
ScriptManager.RegisterStartupScript(page, page.GetType(), Guid.NewGuid().ToString(), "alert('没有资源搜索的权限!');window.history.go(-1);", true); 可能是这个出现问题了