Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÊý¾Ý¿â²Ù×÷Àà(´æ´¢¹ý³Ì´¦Àí)

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.ComponentModel;
namespace SQLHelper
{
 /// <summary>
 /// Class1 µÄժҪ˵Ã÷¡£
 /// </summary>
 public class SQLHelper
 {
  // Á¬½ÓÊý¾ÝÔ´
  private SqlConnection myConnection;
  private readonly string RETURNVALUE = "RETURNVALUE";
  /// <summary>
  /// ´ò¿ªÊý¾Ý¿âÁ¬½Ó.
  /// </summary>
  private void Open()
  {
   // ´ò¿ªÊý¾Ý¿âÁ¬½Ó
   if (myConnection == null)
   {
    myConnection = new SqlConnection(ConfigurationSettings.AppSettings["SQLCONNECTIONSTRING"].ToString());    
   }    
   if(myConnection.State == ConnectionState.Closed)
   {  
    try
    {
     ///´ò¿ªÊý¾Ý¿âÁ¬½Ó
     myConnection.Open();
    }
    catch(Exception ex)
    {
     SystemError.SystemLog(ex.Message);
    }
    finally
    {
     ///¹Ø±ÕÒѾ­´ò¿ªµÄÊý¾Ý¿âÁ¬½Ó    
    }
   }
  }
  /// <summary>
  /// ¹Ø±ÕÊý¾Ý¿âÁ¬½Ó
  /// </summary>
  public void Close()
  {
   ///ÅжÏÁ¬½ÓÊÇ·ñÒѾ­´´½¨
   if(myConnection != null)
   {
    ///ÅжÏÁ¬½ÓµÄ״̬ÊÇ·ñ´ò¿ª
    if(myConnection.State == ConnectionState.Open)
    {
     myConnection.Close();
   &


Ïà¹ØÎĵµ£º

asp.netÖе÷ÓÃjavascript×Ô¶¨Ò庯ÊýµÄ·½·¨×ܽá

ͨ³£javascript´úÂë¿ÉÒÔÓëHTML±êǩһÆðÖ±½Ó·ÅÔÚǰ¶ËÒ³ÃæÖУ¬µ«Èç¹ûJS´úÂë¶àµÄ»°Ò»·½Ãæ²»ÀûÓÚά»¤£¬ÁíÒ»·½ÃæÒ²¶ÔËÑË÷ÒýÇæ²»ÓѺã¬Òò
ÎªÒ³ÃæÒò´Ë¶ø±äµÃÓ·Ö×£»ËùÒÔÒ»°ãÓÐÁ¼ºÃ¿ª·¢Ï°¹ßµÄ³ÌÐòÔ±¶¼»á°Ñjavascript´úÂë·Åµ½¶ÀÁ¢µÄjsÎļþÖУ¬ÆäËûÒ³ÃæÍ¨¹ýÒýÈë¸ÃjsÎļþÀ´Ê¹ÓÃÏàÓ¦µÄ
javascript´úÂë¡£
½ñÌìÔÚ×öÒ»¸öСÐÂÎÅϵͳµÄ¹ÜÀí ......

asp.net»ñÈ¡´«ÖµgetºÍpostÇëÇó


//postÇëÇó
string name = Request["name"].toString();
string name   =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ
¶¼¿ÉÓÃstring name = Request["name"].toString();
±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µ ......

ASP.NETÖÐÁ¬½ÓÊý¾Ý¿âµÄ¸÷ÖÖ·½·¨


½ñÌ죬ѧϰÁËASP.NETÖÐÁ¬½ÓÊý¾Ý¿âµÄ¸÷ÖÖ·½·¨£¬ÕâÊÇÎÒ×Ô¼ºµÄÒ»¸öС×ܽᣬ²»Ò»¶¨ÍêÈ«ÕýÈ·£¬½ö¹©²Î¿¼£¡   O(∩_∩)O~
 
 
Á¬½ÓSQLÊý¾Ý¿âµÄ·½·¨£º
(Ò»)¡¢ÔÚWeb.ConfigÖд´½¨Á¬½Ó×Ö·û´®£º
1¡¢
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename= ......

asp.net¶¯Ì¬Éú³ÉtxtÎı¾Îļþ¹©Óû§ÏÂÔØ

 Ò»£¬JS¶¯Ì¬´´½¨±íµ¥
 var result = "   <form method='post'  action='../xiazai.aspx'><table width='100%' border='0' cellpadding='0' cellspacing='1' bgcolor='#BDB4A2'>"+
                "&l ......

VFPÈçºÎµ÷ÓÃASP.NET Web·þÎñÖеÄDataSet

Ò»¡¢ASP.NET Web Service´úÂë
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
 
namespace WebService1
{
    /// <sum ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ