ASP.NET DBHelperÀà
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data.Common;
using System.Data;
namespace DownData.dal
{
public static class DBHelper
{
private static readonly string connectionString =
"Data Source=.\\newdb;Initial Catalog=downloaddata; uid=sa;pwd=sa";
private static readonly string providerName ="System.Data.SqlClient";
//GetConnection ÓÃÓÚ»ñÈ¡Á¬½ÓÊý¾Ý¿âµÄ connection ¶ÔÏó...
private static DbConnection GetConnection()
{
DbProviderFactory _factory = DbProviderFactories.GetFactory(providerName);
DbConnection connection = _factory.CreateConnection();
connection.ConnectionString = connectionString;
return connection;
}
//GetCommand »ñÈ¡ÃüÁî²ÎÊý command ¶ÔÏó...
private static DbCommand GetCommand(string commandText, CommandType commandType, DbConnection connection)
{
DbCommand command = connection.CreateCommand();
command.CommandText = commandText;
command.CommandType = commandType;
 
Ïà¹ØÎĵµ£º
ÏÈ¿´¿´ASP.NETÒ³ÃæˢеÄʵÏÖ·½·¨£º
µÚÒ»£º
C# code
private void Button1_Click( object sender, System.EventArgs e )
{
Response.Redirect( Request.Url.ToString( ) );
}
µÚ¶þ£º
C# code
private void Button2_Click( object sender, System.EventArgs e )
{
Response.Write( " < script lang ......
///C#ÖеÄýÌå²¥·ÅÀà
using System;
namespace ConfigTools
{
/// <summary>
/// PlayClass µÄժҪ˵Ã÷¡£
///Ô×÷CSDN,¾±¾ÈËÉÔ¼ÓÐÞ¸Ä
/// </summary>
public class PlayClass
{
public PlayClass()
{
......
¡¡¡¡½ñÌìTMȺÀïÓÐÈËÎÊÆð¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬ÓÖÒý·¢ÁËÒ»³¡ÌÖÂÛ¡£¿´À´Õâ¸ö»¹ÊÇÓкܶàÈ˹Ø×¢µÄ£¬Òò´ËÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡1. ʹÓÃQueryString±äÁ¿
¡¡¡¡¡¡¡¡QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṠ......
ʼþÄ£ÐÍ
µ±Ä³¸öÒ³Ãæ±»ÇëÇóʱ£¬ËüµÄÀ༰ÆäËù°üº¬µÄ·þÎñÆ÷¿Ø¼þ»á¸ºÔð´¦ÀíÇëÇ󣬳ÊÏÖHTMLÊä³ö£¬²¢Ëæºó·¢»Ø¿Í»§¶Ë¡£ÓÉÓÚHTTPÐÒéµÄ¹ÌÓÐÌØÐÔ£¬¿Í»§¶ËÓë·þÎñÆ÷¼äµÄͨÐÅÊÇÎÞ״̬ÇÒ·ÇÁ¬½ÓµÄ¡£¶øʵ¼ÊµÄÓ¦ÓóÌÐòÐèҪ״̬£¬ÒÔ±ãά»¤¶ÔͬһҳÃæµÄºóÐøµ÷Óá£Ê¹ÓÃASP»òÆäËû·þÎñÆ÷¶Ë¿ª·¢Æ½Ì¨(ÈçJava Server PageºÍLAMPÒ»ÀàµÄ»ùÓÚLinuxµÄÏ ......