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

asp.net(c#) static¹Ø¼ü×ÖÓ÷¨Ð¡½á[zz]

http://ayic1.blog.163.com/blog/static/27343030200965103528805/
¾²Ì¬±äÁ¿
       µ±ÎÒÃDZàдһ¸öÀàʱ£¬Æäʵ¾ÍÊÇÔÚÃèÊöÆä¶ÔÏóµÄÊôÐÔºÍÐÐΪ£¬¶ø²¢Ã»ÓвúÉúʵÖÊÉϵĶÔÏó£¬Ö»ÓÐͨ¹ýnew¹Ø¼ü×ֲŻá²úÉú³ö¶ÔÏó£¬Õâʱϵͳ²Å»á·ÖÅäÄÚ´æ¿Õ¼ä¸ø¶ÔÏó£¬Æä·½·¨²Å¿ÉÒÔ¹©Íⲿµ÷Óá£
       ÓÐʱºò£¬ÎÒÃÇÏ£ÍûÎÞÂÛÊÇ·ñ²úÉúÁ˶ÔÏó»òÎÞÂÛ²úÉúÁ˶àÉÙ¶ÔÏóµÄÇé¿öÏ£¬Ä³Ð©Ìض¨µÄÊý¾ÝÔÚÄÚ´æ¿Õ¼äÀïÖ»ÓÐÒ»·Ý£¬ÀýÈçËùÓеÄÖйúÈ˶¼Óйú¼ÒÃû³Æ£¬Ã¿Ò»¸öÖйúÈ˶¼¹²ÏíÕâ¸ö¹ú¼ÒÃû³Æ£¬²»±ØÔÚÿһ¸öÖйúÈ˵ÄʵÀý¶ÔÏóÖж¼µ¥¶À·ÖÅäÒ»¸öÓÃÓÚ´úÂë¹ú¼ÒÃû³ÆµÄ±äÁ¿¡£Àý×Ó£º
protected void Page_Load(object sender, EventArgs e)
{       
    //Ö±½ÓʹÓÓÀàÃû.³ÉÔ±”µÄ¸ñʽ£¬²»ÄÜʹÓÓ¶ÔÏóÃû.³ÉÔ±”µÄ¸ñʽ£¬ÕâµãÓëJAVA²»Ò»Ñù£¬JAVAÁ½ÖÖ¶¼¿ÉÒÔʹÓÃ
    Response.Write(Chinese.Country);    
}
 class Chinese
 {
    public static string Country = "Öйú";
    public void getCountry()
    {
        //ÀàÖеijÉÔ±·½·¨Ò²¿ÉÒÔÖ±½Ó·ÃÎʾ²Ì¬³ÉÔ±±äÁ¿
        HttpContext.Current.Response.Write("ÄãºÃ£¡" + Country);
    }
}
ÐèҪעÒâµÄÊÇ£º²»ÄÜ°ÑÈκη½·¨ÌåÄڵıäÁ¿ÉùÃ÷Ϊ¾²Ì¬£¬ÈçÏÂÃæÕâÑùÊDz»Ðеģº
public void getCountry()
{
            //ÀàÖеijÉÔ±·½·¨Ò²¿ÉÒÔÖ±½Ó·ÃÎʾ²Ì¬³ÉÔ±±äÁ¿
            HttpContext.Current.Response.Write("ÄãºÃ£¡" + Country);
            static int i = 1;
}
 
¾²Ì¬·½·¨
       ÎÒÃÇÓÐʱҲϣÍû²»±Ø´´½¨¶ÔÏó¾Í¿ÉÒÔµ÷ÓÃij¸ö·½·¨£¬»»¾ä»°ËµÒ²¾ÍÊÇʹ¸Ã·½·¨²»±ØºÍ¶ÔÏó°ó¶¨ÔÚÒ»Æð¡£ÒªÊµÏÖÕâÑùµÄЧ¹û£¬Ö»ÐèÒªÔÚÀàÖж¨ÒåµÄ·½·¨Ç°¼ÓÉÏstatic¹Ø¼ü×־ͿÉÒÔÁË£¬ÎÒÃdzÆÕâÖÖ·½·¨Îª¾²Ì¬³ÉÔ±·½·¨£¬»¹¿ÉÒÔÔÚÀàµÄ·Ç¾²Ì¬³ÉÔ±·½·¨ÖÐÏó·ÃÎÊÆäËû¾²Ì¬·½·¨Ò»ÑùÈ¥·ÃÎÊÕâ¸ö¾²Ì¬·½·¨£¬Àý×Ó£º
prot


Ïà¹ØÎĵµ£º

asp.netÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄܵķ½·¨

1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯¡¡
¡¡
Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø±ÕÊ±Ê ......

Asp.net treeviewʵÏÖÎÞÏÞ¼¶Ê÷

×î½üÑо¿ÁËÒ»ÏÂtreeview£¬·¢ÏÖÓÐÁ½ÖÖʵÏÖÎÞÏÞ¼¶Ê÷µÄ·½·¨£¬ÎÄ×Ö²»Ïë¶àд£¬Ö±ÈëÖ÷Ìâ¡£
ÏÈ¿´¿´Êý¾Ý¿â±íµÄÉè¼Æ£¬Êý¾Ý±íÖ÷Òª°üÀ¨ID£¬Name£¬ParentIDÕâÈýÏÆäÖÐIDÊÇÖ÷¼ü£¬ParentID¶ÔÓ¦½ÚµãµÄ¸¸½Úµã£º
·½·¨Ò»£ºÓõݹé±éÀúÊý¾Ý£¬²¢½«½ÚµãÖð¸öÌí¼Óµ½treeviewÖÐÈ¥¡£
1.ÏȽøÐÐÊý¾Ý¿âÁ¬½ÓºÍÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«¸ù½ÚµãÏÈÌí¼Ó½øtreeview ......

asp.net °ó¶¨GridView

ǰ̨ aspx Îļþ:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<he ......

ÔÚ ASP.NET MVC ÏîÄ¿ÖÐʹÓà WebForm

ASP.NET MVCºÍWebForm¸÷Óи÷µÄÓŵ㣬ÎÒÃÇ¿ÉÄÜÐèҪͬʱʹÓÃASP.NET MVCºÍWebForm¡£±¾ÎĽéÉÜÁËÈçºÎÔÚASP.NET MVCÏîÄ¿ÖÐʹÓÃWebForm¡£
Ê×ÏÈн¨Ò»¸öÃûΪWebFormsµÄÎļþ¼ÐÓÃÓÚ´æ·ÅWebForm£¬²¢Ìí¼ÓÒ»¸öWeb´°ÌåÎļþDemo.aspx×÷ΪÑÝʾ¡£
Demo.aspx¾Í¼òµ¥µÄÊä³öÒ»¾ä»°“It’s a WebForm.”
¹Ø¼ü²½ÖèÔÚÓÚ·ÓÉÉèÖá ......

ASP.NetµÄ20¾ä

__________________________________________________________
¼øÓÚ¹ã´óȺÖÚÒâ¼û£¬½áÌû£¬²»ÔÙ¶¥Æð¡£
¸Ðл¥Ö÷µÄ·ÖÏí¡£
by Öñ×Ó°æÖ÷
__________________________________________________________
¡¾Ç°Ðò¡¿
ASP.NET³£ÓÃÓï¾ä1--20Ìõ
ASP.NET³£ÓÃÓï¾ä21-26Ìõ
27.Êý×Ö¸ñʽ»¯
¡¾£¼%#Container.DataItem(&q ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ