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 ......
±¾ÏµÁÐÎÄÕ»ùÓÚASP.NET MVC Preview5.
ControllerÊÇMVCÖбȽÏÖØÒªµÄÒ»²¿·Ö¡£¼¸ºõËùÓеÄÒµÎñÂß¼¶¼ÊÇÔÚÕâÀï½øÐд¦ÀíµÄ£¬²¢ÇÒ´ÓModelÖÐÈ¡³öÊý¾Ý¡£ÔÚASP.NET
MVC
Preview5ÖУ¬½«ÔÀ´µÄControllerÀàÒ»·ÖΪ¶þ£¬·ÖΪÁËControllerÀàºÍControllerBaseÀà¡£ControllerÀà
¼Ì³Ð×ÔControllerBaseÀ࣬¶øControllerBaseʵÏÖÊÇÁËICont ......
¡¡¡¡½ñÌìTMȺÀïÓÐÈËÎÊÆð¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬ÓÖÒý·¢ÁËÒ»³¡ÌÖÂÛ¡£¿´À´Õâ¸ö»¹ÊÇÓкܶàÈ˹Ø×¢µÄ£¬Òò´ËÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡1. ʹÓÃQueryString±äÁ¿
¡¡¡¡¡¡¡¡QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṠ......
¿ª·¢Öо³£Óöµ½ÒªÖØÖÿؼþÖµµÃ²Ù×÷£¬ÏÂÃæдÁ˳£ÓÃHTML¿Ø¼þµÄÖØÖ÷½·¨¡£²»ÍêÕûµÄ£¬´ó¼Ò¿ÉÒÔÀ©³ä
function ResetControl() {
var v = document.forms[0].elements;
for (var i = ......