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

ASP.NET¿ª·¢¾­Ñé»ýÀÛ

ÔÚ¿ª·¢¹ý³ÌÖУ¬Í¨¹ýÃþË÷²é×ÊÁÏ£¬ÊÕ¼¯ÁËһЩֵµÃÌá³öÀ´µÄ¾­Ñ飺
1¡¢ Ïà¶ÔÓÚÔ­À´µÄforÓï¾äforeach¾ßÓиüºÃµÄÖ´ÐÐЧÂÊ£¬foreachµÄƽ¾ù»¨·Ñʱ¼äÖ»ÓÐforµÄ30%¡£Í¨¹ý²âÊÔ½á¹ûÔÚforºÍforeach¶¼¿ÉÒÔʹÓõÄÇé¿öÏ£¬ÎÒÃÇÍƼöʹÓÃЧÂʸü¸ßµÄforeach¡£ÁíÍ⣬ÓÃforдÈëÊý¾Ýʱ¼ä´óÔ¼ÊǶÁÈ¡Êý¾Ýʱ¼äµÄ10±¶×óÓÒ£»
2¡¢ ÔÚasp.net³ÌÐòÖУ¬Ê¹ÓÃsaÕ˺ŵÄÊÇÒ»Öַdz£²»°²È«µÄ×ö·¨£¬Ëü¾ßÓÐÔÚÊý¾Ý¿âÉÏÖ´ÐÐÈκβÙ×÷µÄȨÏÞ¡£ºÚ¿Í¿ÉÒÔµ÷ÓÃÀàËÆÓÚxp_cmdshellÕâÑùµÄÀ©Õ¹´æ´¢¹ý³Ì½øÐй¥»÷£»
3¡¢ ÔÚ´¦ÀíÊý¾Ý½»»¥µÄʱºò£¬¾¡Á¿½«×éÖ¯SQLÓï¾äµÄ´¦Àí·Åµ½Öмä²ã£¨±ÈÈçרÃŵÄÊý¾Ý²Ù×÷Àà¡¢´æ´¢¹ý³ÌµÈ£©£¬ÕâÊÇ·ÀÖ¹×¢Èëʽ¹¥»÷µÄÓÐЧ·½·¨£»
4¡¢±ÜÃâµ½·þÎñÆ÷µÄ²»±ØÒªµÄÍù·µ¹ý³Ì¡£Ê¹Óà Page.IsPostBack ±ÜÃâ¶ÔÍù·µ¹ý³ÌÖ´Ðв»±ØÒªµÄ´¦Àí£»
5¡¢ Ò»¶¨Òª½ûÓõ÷ÊÔģʽ£»
6¡¢ Ò»°ãÇé¿öÏÂ,¶ÁÈ¡´óÁ¿Êý¾Ý,¶Ô·µ»ØÊý¾Ý²»×ö´óÁ¿´¦ÀíÓÃSqlDataReader.¶Ô·µ»ØÊý¾Ý´óÁ¿´¦ÀíÓÃDatSet±È½ÏºÏÊÊ.¶ÔSqlDataReaderºÍDataSetµÄÑ¡ÔñÈ¡¾öÓÚ³ÌÐò¹¦ÄܵÄʵÏÖ£»
7¡¢Êý¾Ý°ó¶¨½¨ÒéʹÓÃ<%# ctype(Container.DataItem,DataRowView).Row("×Ö¶ÎÃû") %>¡£Êý¾ÝÁ¿´óµÄʱºò¿ÉÌá¸ß¼¸°Ù±¶µÄËٶȣ»
1¡¢ÓÃSqlDataSource·ÃÎÊÊý¾Ý¿â¿âµÄ·½·¨£º
<asp:SqlDataSource ID="SqlDS_Search" runat="server" ConnectionString="<%$
ConnectionStrings:chtNorthwind %>"
                SelectCommand="SELECT [Ô±¹¤ºÅÂë], [ÐÕÃû], [ÐÔ±ð], [²¿ÃÅ], [ÕÕ
Ƭ] from [ÕÂÁ¢ÃñÑо¿ÊÒ] WHERE ([²¿ÃÅ] = @²¿ÃÅ) ORDER BY [Ô±¹¤ºÅÂë]" />
ÍùsqlÀïÃæ´«²ÎÊýµÄ·½·¨£º
SqlDS_Search.SelectParameters.Clear();//ÏÈÇå¿Õ£¬ºÃÏ°¹ß
SqlDS_Search.SelectParameters.Add("²¿ÃÅ",²¿ÃŲÎÊýµÄÖµ);
2¡¢Gridview ÖÐÏÔʾij¸ö×ֶεķ½·¨<%# Eval("Ô±¹¤ºÅÂë") %>
GridviewÖпÉÒÔµ÷Óúǫ́¶¨ÒåµÄº¯Êý¡£
ÀýÈ磺<%# FormatGender(Eval("ÐÔ±ð")) %>
ºǫ́¶¨ÒåµÄ·½·¨£º
// ½«ÐÔ±ð¸ÄÓÃͼ±êÀ´ÏÔʾ¡£
    protected string FormatGender(object dataGender)
    {
        string myGender = Convert.ToString(dataGender);
        string strReturn = "";
        switch (myGende


Ïà¹ØÎĵµ£º

Asp.netÖÐʵÏÖͬһÓû§Ãû²»ÄÜͬʱµÇ½(µ¥µãµÇ½)

Web ÏîÄ¿Öо­³£Óöµ½µÄÎÊÌâ¾ÍÊÇͬһÓû§Ãû¶à´ÎµÇ½µÄÎÊÌ⣬ÏàÓ¦µÄ½â¾ö°ì·¨Ò²ºÜ¶à£¬×ܽáÆðÀ´²»ÍâºõÕ⼸ÖÖ½â¾ö°ì·¨£º½«µÇ½ºóµÄÓû§Ãû·Åµ½Êý¾Ý¿â±íÖУ»µÇ½ºóµÄÓû§Ãû·Åµ½SessionÖУ»µÇ½ºóµÄÓû§Ãû·Åµ½ApplicationÖУ»µÇ½ºóµÄÓû§Ãû·Åµ½CacheÖС£Ò»°ãµÄÕ⼸ÖÖ·½·¨¶¼ÊǵǽÁËÖ®ºó£¬Èç¹ûûÓÐÕý³£Í˳ö£¬µÚ¶þ´ÎµÇ½½«²»±»ÔÊÐí¡£Õ ......

Asp.NETÖг£ÓõÄһЩÓÅ»¯ÐÔÄܵķ½·¨

ASP.NET µÄ»º´æ»úÖÆÏà±ÈASPÓкܴóµÄ¸Ä½ø£¬±¾Îĵµ³ý¶Ô³£ÓÃÓÅ»¯·½·¨½øÐÐ×ܽá½éÉÜÍ⣬ǿµ÷ÁËÈçºÎʹÓÃASP.NETµÄ»º´æÀ´»ñµÃ×î¼ÑÐÔÄÜ¡£
1£º²»ÒªÊ¹Óò»±ØÒªµÄsession
ºÍASPÖÐÒ»Ñù£¬ÔÚ²»±ØÒªµÄʱºò²»ÒªÊ¹ÓÃSession¡£
¿ÉÒÔÕë¶ÔÕû¸öÓ¦ÓóÌÐò»òÕßÒ³Ãæ½ûÓûỰ״̬£º
l         ½ûÓÃÒ³ÃæµÄ ......

ASP.NETÖ´Ðд洢¹ý³Ì£¬²¢»ñÈ¡´æ´¢¹ý³ÌµÄ·µ»ØÖµ


ASP.NETÖ´Ðд洢¹ý³Ì£¬²¢»ñÈ¡´æ´¢¹ý³ÌµÄ·µ»ØÖµ

    Ò»¸ö¼òµ¥Àý×ÓÈçÏ£º
      1¡¢´´½¨´æ´¢¹ý³Ì£¨ÓÃÓÚÓû§Éí·ÝÑéÖ¤£©£º
      Create Procedure CheckUser
    (
     @userid char(20),
 & ......

asp.netʵÏÖÉÏ´«Îļþ

fileupload¿Ø¼þµÄÓ÷¨
ASPXÒ³Ãæ
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ