Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ʵÏÖÎļþÏÂÔØ(wapÊÖ»úÏÂÔØ)

Õâ¸öÎÊÌâÀ§ÈÅÁËÎÒÁ½Ì죬ÊÖ»úÏÂÔØ
 protected void Page_Load(object sender, EventArgs e)
    {
        string filename = Server.UrlDecode(Request["upload"]);
        string filePath = Server.MapPath("uploa ......

asp.netºǫ́Óëǰ̨µÄ»¥Ïàµ÷ÓÃ

Ò».ºǫ́µ÷ÓÃǰ̨
1.Page.ClientScript.RegisterStartupScript(type,"",script);
Àý:
string script = string.Format("<script>alert('Wrong');</script>");
Page.ClientScript.RegisterStartupScript(GetType(), "Load", script);
2.¶ÔÏó.Attributes.Add("ʼþ","script")
Àý:
e.Row.Attributes.Add("on ......

asp.net С²ËÄñ ±ØÑ§

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
½ÓÊÕ²ÎÊý£º
string a  = Request.QueryString("id");
string b  = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Att ......

ASP.NET AJAX ʵÏֵǽÎÞË¢ÐÂ/¶¯Ì¬Ìí¼Ó·þÎñÆ÷¿Ø¼þ

ÔÚ×î½ü¿ªÊ¼½«AJAX¼¼Êõ¼ÓÈëµ½ÈÕ³£µÄ¿ª·¢¹¤×÷ÖС£ÎÒÔÚ×î½üдÁ˸öAJAXµÄÎÞˢеǽÇÒ¶¯Ì¬Ìí¼Ó·þÎñÆ÷¿Ø¼þµÄ¹¤×÷£¬ÎÒ½«´Ë¹¦ÄܸæËß´ó¼ÒÏ£Íû¶Ô´ó¼ÒµÄ¹¤×÷ÓÐËù°ïÖú¡£Èç¹û´ó¼ÒÓиüºÃµÄ·½·¨ÇÒÔ¸ÒâÔÚ´ËÁôÑÔÈÃÎÒÒ²¿ÉÒÔ·ÖÏíµ½ÄãµÄ³É¹û¡£
Ê×ÏÈÔÚÒ³ÃæÖеÄHTML±ê¼ÇÖмÓÈë¿Ø¼þUpdatePanelºÍÁ½¸öTextboxÒ»¸öButton£º
<asp:UpdatePanel ID ......

asp.netÐÔÄÜÓÅ»¯×ܽá ÐÄÈçֹˮ

1. C#ÓïÑÔ·½Ãæ
1.1 À¬»ø»ØÊÕ
¡¡À¬»ø»ØÊÕ½â·ÅÁËÊÖ¹¤¹ÜÀí¶ÔÏóµÄ¹¤×÷£¬Ìá¸ßÁ˳ÌÐòµÄ½¡×³ÐÔ£¬µ«¸±×÷ÓþÍÊdzÌÐò´úÂë¿ÉÄܶÔÓÚ¶ÔÏó´´½¨±äµÃËæÒâ¡£
¡¡1.1.1 ±ÜÃâ²»±ØÒªµÄ¶ÔÏó´´½¨
¡¡ÓÉÓÚÀ¬»ø»ØÊյĴú¼Û½Ï¸ß£¬ËùÒÔC#³ÌÐò¿ª·¢Òª×ñÑ­µÄÒ»¸ö»ù±¾Ô­Ôò¾ÍÊDZÜÃâ²»±ØÒªµÄ¶ÔÏó´´½¨¡£ÒÔÏÂÁоÙһЩ³£¼ûµÄÇéÐΡ£
¡¡1.1.1.1 ±ÜÃâÑ­»·´´½¨¶ÔÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ