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
相关文档:
DataGridView 72计
本文将介绍ASP.NET中DataGridView的用法,DataGridView在Asp.net中是常用的控件之一,掌握好DataGridView的特点和用法。将对程序的性能有大大的提高,同时也能加快我们项目的开发周期!
快速预览:
GridView无代码分页排序
GridView选中,编辑,取消,删除
GridView正反双向排序
GridView和下拉菜单 ......
$.ajax({
type: "POST", //访问WebService使用Post方式请求
......
MVC自带的ActionFilter
在Asp.Net WebForm的中要做到身份认证微软为我们提供了三种方式,其中最常用的就是我们的Form认证,需要配置相应的信息。例如下面的配置信息:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" />
</authenticati ......
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在开发时,在不同的页面间跳转是我们常遇到的一件事,当一个复杂的逻辑在一个页面放不下分成二个或多个页面处理就需要在页面间跳转,用的最多还是用户的登陆吧.
ASP.NET用的最多的跳转是Response.Redirect,这个命令可以直接把请求重定向到一个相对或绝对的路径.它会把当前页面的的Http流阻断直接重定向到新的U ......