易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net的一个dbhelper类

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace Maticsoft.DBUtility
{
     /// <summary>
     /// Copyright (C) 2004-2008 
     /// 数据访问基础类(基于SQLServer)
     /// 用户可以修改满足自己项目的需要。
     /// </summary>
     public abstract class DbHelperSQL
    {
           //数据库连接字符串(web.config来配置)
           //<add key="ConnectionString" value="server=127.0.0.1;database=DATABASE;uid=sa;pwd=" />  
            protected static string connectionString = System.Configuration.ConfigurationManager.AppSettings["ConnectionString"].ToString();
            public DbHelperSQL()
           {   
           }
           #region 公用方法
           public static int GetMaxID(string FieldName,string TableName)
           {
                 string strsql = "select max(" + FieldName + ")+1 from " + TableName;
                 object obj = GetSingle(strsql);
                 if (obj == n


相关文档:

asp.net清除html标记

#region 清除文本样式  主要应用于从网络粘贴进来的文本
        [WebMethod]
        public static string ClearStyle(string yourStr)//清除样式
        {
      & ......

ASP.NET 页面事件执行顺序 收藏

ASP.NET 页面事件执行顺序 收藏
过程描述
下面是ASP.NET页面初始的过程:
1. Page_Init();
2. Load ViewState;
3. Load Postback data;
4. Page_Load();
5. Handle control events;
6. Page_PreRender();
7. Page_Render();
8. Unload event;
9. Dispose method called;
下面对其中的一些过程作下描述:
1. Pa ......

Asp.Net MVC中身份认证和授权

MVC自带的ActionFilter
在Asp.Net WebForm的中要做到身份认证微软为我们提供了三种方式,其中最常用的就是我们的Form认证,需要配置相应的信息。例如下面的配置信息:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" />
</authenticati ......

ASP.NET web app performance issue ThreadPool

 
One of my bank customers planned to roll out a new ASP.NET web application serving as their critical internet banking portal. They faced some weird performance issue in their UAT environment. They noticed the CPU utilization was really high (above 90%) without any fluctuation. After checking ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号