易截截图软件、单文件、免安装、纯绿色、仅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【DataGridView】72计

DataGridView 72计
本文将介绍ASP.NET中DataGridView的用法,DataGridView在Asp.net中是常用的控件之一,掌握好DataGridView的特点和用法。将对程序的性能有大大的提高,同时也能加快我们项目的开发周期!
快速预览:
GridView无代码分页排序
GridView选中,编辑,取消,删除
GridView正反双向排序
GridView和下拉菜单 ......

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导出Excel乱码的解决方案

在asp.net中导出excel 中比较通行的做法是: Response.ContentType = "application/vnd.ms-excel";
然后直接向里面扔 html 的table
但是有中文的时候 老出现乱码,有很多解决方案,但都不能通盘解决, 就是在 输出html两头输出
 
Response.Write("<html><head><meta http-equiv=Content-Type conte ......

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 ......

ASP.NET 页面间数据传递方法小结

Web 页面是无状态的, 服务器对每一次请求都认为来自不同用户,因此,变量的状态在连续对同一页面的多次请求之间或在页面跳转时不会被保留。
0、引言
Web 页面是无状态的,服务器对每一次请求都认为来自不同用户,因此,变量的状态在连续对同一页面的多次请求之间或在页面跳转时不会被保留。在用Asp.NET 设计开发一个Web ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号