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

asp.net·Ö²¿Àà(Partial Classes)

·Ö²¿Àà(Partial Classes)
C# 2.0 ¿ÉÒÔ½«Àà¡¢½á¹¹»ò½Ó¿ÚµÄ¶¨Òå²ð·Öµ½Á½¸ö»ò¶à¸öÔ´ÎļþÖУ¬ÔÚÀàÉùÃ÷ǰÌí¼Ópartial¹Ø¼ü×Ö¼´¿É¡£
ÀýÈ磺ÏÂÃæµÄPartialTestÀà
class PartialTest
{
string Str_FieldTest;
int Int_FieldTest;
public void DoTest()
{
Debug.Print("Test");
}
}
¿ÉÔÚ²»Í¬Ô´ÎļþÖÐд³ÉÏÂÃæÐÎʽ£º
Ò»¸öÎļþÖÐд£º
partial class PartialTest
{
string Str_FieldTest;
int Int_FieldTest;
}
ÁíÒ»¸öÎļþÖÐд£º
partial class PartialTest
{
public void DoTest()
{
Debug.Print("Test");
}
}
 
ʲôÇé¿öÏÂʹÓ÷ֲ¿Àࣿ
–        ´¦Àí´óÐÍÏîĿʱ£¬Ê¹Ò»¸öÀà·Ö²¼ÓÚ¶à¸ö¶ÀÁ¢ÎļþÖпÉÒÔÈöàλ³ÌÐòԱͬʱ¶Ô¸ÃÀà½øÐд¦Àí£¨Ï൱ÓÚÖ§³Ö²¢Ðд¦Àí£¬ºÜʵÓã©£»
–        ʹÓÃ×Ô¶¯Éú³ÉµÄԴʱ£¬ÎÞÐèÖØÐ´´½¨Ô´Îļþ±ã¿É½«´úÂëÌí¼Óµ½ÀàÖС£Visual Studio ÔÚ´´½¨Windows ´°Ìå¡¢Web ´°Ìåʱ¶¼Ê¹Óô˷½·¨¡£Äã²»Óñ༭Visual Studio Ëù´´½¨µÄÎļþ£¬±ã¿É´´½¨Ê¹ÓÃÕâЩÀàµÄ´úÂë¡£»»¾ä»°Ëµ£ºÏµÍ³»á×Ô¶¯´´½¨Ò»¸öÎļþ£¨Ò»°ã¼Ç¼µÄÊÇ´°Ìå¼°´°ÌåÖеĿؼþµÄÊôÐÔ£©£¬ÁíÒ»¸ö»ò¼¸¸öÎļþ¼Ç¼µÄÊÇÓû§×Ô¼º±àдµÄ´úÂë¡£ÕâÁ½²¿·Ö·Ö¿ª¿ÉÒÔʹ½á¹¹ÏԵ÷dz£ÇåÎú£¬Óû§Ö»Ðè¹Ø×¢×Ô¼º¸ºÔðµÄÄDz¿·Ö¾ÍÐÐÁË£¨ÐèÒªµÄ»°£¬ÕâÁ½²¿·Ö¿ÉÒÔ»¥Ïàµ÷Óã©¡£µÈµ½Á˱༭ÔËÐеÄʱºò£¬ÏµÍ³»á×Ô¶¯½«ÕâÁ½²¿·ÖºÏ³ÉÒ»¸öÎļþ¡£
ʹÓÃPartialÐèҪעÒâÒÔÏÂһЩÇé¿ö£º
1.      ʹÓÃpartial ¹Ø¼ü×Ö±íÃ÷¿ÉÔÚÃüÃû¿Õ¼äÄÚ¶¨Òå¸ÃÀà¡¢½á¹¹»ò½Ó¿ÚµÄÆäËû²¿·Ö
2.      ËùÓв¿·Ö¶¼±ØÐëʹÓÃpartial ¹Ø¼ü×Ö
3.      ¸÷¸ö²¿·Ö±ØÐë¾ßÓÐÏàͬµÄ¿É·ÃÎÊÐÔ£¬Èçpublic¡¢private µÈ
4.      Èç¹û½«ÈÎÒⲿ·ÖÉùÃ÷Ϊ³éÏóµÄ£¬ÔòÕû¸öÀàÐͶ¼±»ÊÓΪ³éÏóµÄ
5.      Èç¹û½«ÈÎÒⲿ·ÖÉùÃ÷ΪÃÜ·âµÄ£¬ÔòÕû¸öÀàÐͶ¼±»ÊÓΪÃÜ·âµÄ
6.      Èç¹ûÈÎÒⲿ·ÖÉùÃ÷¼Ì³Ð»ùÀàʱ£¬ÔòÕû¸öÀàÐͶ¼½«¼Ì³Ð¸ÃÀà
7.      ¸÷¸ö²¿·Ö¿ÉÒÔÖ¸¶¨²»Í¬µÄ»ù½Ó¿Ú£¬×îÖÕÀàÐͽ«ÊµÏÖËùÓзֲ¿ÉùÃ÷ËùÁгöµÄÈ«²¿½Ó¿Ú
8.      ÔÚijһ·Ö²¿¶¨ÒåÖÐÉùÃ÷µÄÈκÎÀà¡¢½á¹¹»ò½Ó¿Ú³ÉÔ±¿É¹©ËùÓÐÆäËû²¿·ÖʹÓÃ
9£®Ç¶Ì×ÀàÐÍ¿ÉÒÔÊÇ·Ö²¿µÄ£¬¼´Ê¹ËüÃÇËùǶÌ×ÓÚµÄÀàÐͱ


Ïà¹ØÎĵµ£º

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 ......

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

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
namespace class_new
{
 /// <summary>
 /// DataClass µÄժҪ˵Ã÷¡£
 /// </summary>
 public class DataClass
 {
  private string strConnection="";
 &n ......

ASP.NetÖÐÀûÓÃashxʵÏÖͼƬ·ÀµÁÁ´´úÂë

GET /Img.ashx?img=svn_work.gif HTTP/1.1
Accept: */*
Referer: http://www.svnhost.cn/
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ