进行页面级权限(是否有访问)验证时,在cs页面的pageload中写验证函数,验证函数在页面绑定数据前先验证,可弹出不可访问框的背影下 还存在aspx页面的静态控件内容  现在我想让弹出不访问框下显示是空白 请问怎么做?谢谢了

解决方案 »

  1.   

    Response.Clear();
            Response.End();
    这样能做到吗
      

  2.   

    那你把静态控件设置为runat="server",真心没怎么明白你想要什么东西
      

  3.   

    验证提示  我用的就是js的alert('没有权限!')window.history.go(-1)
      

  4.   

    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>
      

  5.   

    无权限时候 Write(弹出层) 然后  Response.End();    不要clear
      

  6.   


    Rsponse.Write("<script>alert('没有资源搜索的权限!');window.history.go(-1);</script>");
    Response.End();
      

  7.   

    谢谢你啊  你的答复 对极了我验证弹出框用的是这个
    ScriptManager.RegisterStartupScript(page, page.GetType(), Guid.NewGuid().ToString(), "alert('没有资源搜索的权限!');window.history.go(-1);", true); 可能是这个出现问题了