asp.net 权限设置
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Pub 的摘要说明
/// </summary>
public static class Pub
{
//对应一个公共类
//得到是否有模块权限方法
// 11111111;10001111 第一段就代表合同,第二段代表仪表
public static bool bModuleRole(string strRole, string ModuleType)
{
string[] ArryRole=strRole.Split(';');
string subRole = "00000000";
switch (ModuleType)
{
case "ht":
subRole = ArryRole[0];
break;
case "yb":
subRole = ArryRole[1];
break;
}
//如果全部是零,那么没权限
if (int.Parse(subRole)>0)
{
return true;
}
else
{
&nbs
相关文档:
asp.net和ajax未捕获异常处理机制
这里的异常处理主要是指开发人员在业务代码中未捕获的异常。未捕获异常处理的目的:
1:在应用程序域级别对异常类型进行处理;
2:在处理的基础上,可以将错误信息记录日志;
3:以友好的方式提示最终用 ......
Asp.net常用的51个代码(非常实用)
1.//弹出对话框.点击转向指定页面
CODE:
Response.Write("<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
Response.Write("<script>window.location ='http://www.51aspx.com/bizpulic/upmeb.aspx'</script&g ......
public string ClearHtml(string HtmlStr)
{
string tmpStr = HtmlStr;
tmpStr = ReplaceHtml("&#[^>]*;", tmpStr, "");
tmpStr = ReplaceHtml("</?marquee[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?object[^>]*>", tmpStr, "");
tmpSt ......
问题一:简化版Windows XP上安装IIS5.1步骤
简化版XP操作系统的“控制面板-->添加/删除程序-->添加/删除Windows组件”中没有“Internet信息服务(IIS)”这个安装选项,于是阻碍了IIS的正常安装,通过一番网上查阅,终于找到了解决方法,其实可以按照如下步骤解决:
(一)首先在“开始&r ......
ASP.NET程序中常用的三十三种代码
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string& ......