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

130 asp.net ÃæÊÔÌâ

 1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½Ê½¡£
´ð. 1.ʹÓÃQueryString, Èç....?id=1; response. Redirect()....
      2.ʹÓÃSession±äÁ¿
      3.ʹÓÃServer.Transfer
3. Ò»ÁÐÊýµÄ¹æÔòÈçÏÂ: 1¡¢1¡¢2¡¢3¡¢5¡¢8¡¢13¡¢21¡¢34...... ÇóµÚ30λÊýÊǶàÉÙ£¬ ÓõݹéË㷨ʵÏÖ¡£
´ð£ºpublic class MainClass
{
public static void Main()
{
Console.WriteLine(Foo(30));
}
public static int Foo(int i)
{
if (i <= 0)
return 0;
else if(i > 0 && i <= 2)
return 1;
else return Foo(i -1) + Foo(i - 2);
}
}
4.C#ÖеÄίÍÐÊÇʲô£¿Ê¼þÊDz»ÊÇÒ»ÖÖίÍУ¿
´ð £º
ίÍпÉÒÔ°ÑÒ»¸ö·½·¨×÷Ϊ²ÎÊý´úÈëÁíÒ»¸ö·½·¨¡£
ίÍпÉÒÔÀí½âΪָÏòÒ»¸öº¯ÊýµÄÒýÓá£
ÊÇ£¬ÊÇÒ»ÖÖÌØÊâµÄίÍÐ
5.overrideÓëÖØÔصÄÇø±ð
´ð £º
override ÓëÖØÔصÄÇø±ð¡£ÖØÔØÊÇ·½·¨µÄÃû³ÆÏàͬ¡£²ÎÊý»ò²ÎÊýÀàÐͲ»Í¬£¬½øÐжà´ÎÖØÔØÒÔÊÊÓ¦²»Í¬µÄÐèÒª
Override ÊǽøÐлùÀàÖк¯ÊýµÄÖØд¡£ÎªÁËÊÊÓ¦ÐèÒª¡£
6.Èç¹ûÔÚÒ»¸öB/S½á¹¹µÄϵͳÖÐÐèÒª´«µÝ±äÁ¿Öµ£¬µ«ÊÇÓÖ²»ÄÜʹÓÃSession¡¢Cookie¡¢Application£¬ÄúÓм¸ÖÖ·½·¨½øÐд¦Àí£¿
´ð £º
this.Server.Transfer
7.Çë±à³Ì±éÀúÒ³ÃæÉÏËùÓÐTextBox¿Ø¼þ²¢¸øËü¸³ÖµÎªstring.Empty£¿
´ð£º
foreach (System.Windows.Forms.Control control in this.Controls)
{
if (control is System.Windows.Forms.TextBox)
{
System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ;
tb.Text = String.Empty ;
}
}
8.Çë±à³ÌʵÏÖÒ»¸öðÅÝÅÅÐòËã·¨£¿
´ð£º
int [] array = new int
;
int temp = 0 ;
for (int i = 0 ; i < array.Length - 1 ; i++)
{
for (int j = i + 1 ; j < array.Length ; j++)
{
if (array[j] < array[i])
{
temp = array[i] ;
array[i] = array[j] ;
array[j] = temp ;
}
}
}
9.ÃèÊöÒ»ÏÂC#ÖÐË÷ÒýÆ÷µÄʵÏÖ¹ý³Ì£¬ÊÇ·ñÖ»Äܸù¾ÝÊý×Ö½øÐÐË÷Òý£¿
´ð£º²»ÊÇ¡£¿ÉÒÔÓÃÈÎÒâÀàÐÍ¡£
10.ÇóÒÔϱí´ïʽµÄÖµ£¬Ð´³öÄúÏëµ½µÄÒ»Ö


Ïà¹ØÎĵµ£º

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

ASP.NET

      ʹÓà ASP.NET °´Å¥ Web ·þÎñÆ÷¿Ø¼þ¿ÉʹÓû§Äܹ»½«Ò³·¢Ë͵½·þÎñÆ÷²¢´¥·¢Ò³ÉϵÄʼþ¡£
Ò»¡¢±³¾°
¿ÉʹÓà Button Web ·þÎñÆ÷¿Ø¼þΪÓû§ÌṩÏò·þÎñÆ÷·¢ËÍÒ³µÄÄÜÁ¦¡£¸Ã¿Ø¼þ»áÔÚ·þÎñÆ÷´úÂëÖд¥·¢Ò»¸öʼþ£¬Äú¿ÉÒÔ´¦Àí¸ÃʼþÀ´ÏìÓ¦»Ø·¢¡£ÀýÈ磬Óû§¿ÉÒÔָʾÒÑÍê³É±íµ¥»òÏ£ÍûÖ´ÐÐÌض¨µÄÃüÁî¡£
AS ......

ASP.NET GridViewÖеã»÷ɾ³ýµ¯³öÌáʾ

 Ê×ÏÈÌí¼ÓÒ»¸öÄ£°åÁУ¬ÄÚÈÝÈçÏÂ
 <asp:TemplateField HeaderText="²Ù×÷">
       <ItemTemplate>
            <div onclick="return confirm('ÄúÈ·¶¨ÒªÉ¾³ýÂð£¿')">
      ......

asp.net ͼƬÉÏ´«

 protected void Button1_Click(object sender, EventArgs e)
    {
      
        string fullName = this.File1.PostedFile.FileName;//»ñÈ¡ÉÏ´«ÎļþµÄȫ·¾¶
        string size = th ......

ASP.NET

      ¿ÉʹÓà Calendar Web ·þÎñÆ÷¿Ø¼þÏÔʾÈÕÀúÖеĿÉÑ¡ÈÕÆÚ£¬²¢ÏÔʾÓëÌض¨ÈÕÆÚ¹ØÁªµÄÊý¾Ý¡£
Ò»¡¢·½°¸
¿ÉÒÔʹÓà Calendar Web ·þÎñÆ÷¿Ø¼þÖ´ÐÐÏÂÃæµÄ²Ù×÷£º
1¡¢ÏÔʾºÍÑ¡ÔñÈÕÆÚ   ¸Ã¿Ø¼þÏÔʾһ¸öÈÕÀú£¬Óû§Í¨¹ý´ËÈÕÀú¿ÉÒƶ¯µ½ÈÎÒâÒ»ÄêÖеÄÈÎÒâÒ»Ìì¡£ÉèÖà SelectedDate ÊôÐÔ£¬Ê¹Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ