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

ASP.netµÄurlÖØд

1.
ÓйØÓÚURLµÄÖØд£¬±¾ÎÄÒ²Ö»ÊÇÄÃÀ´Ö÷Òâ¡£Ïà¼ÌÓÐMSµÄ×é¼þ“URLRewriter”ºÍÔÚGlobal.asaxÀïµÄ“Application_BeginRequest()”±àÂ뷽ʽ£¬ÒÔ¼°IISÀïµÄISAPIÉèÖá£
ÄÈÁÐÏÂÀ´£¬ÊµÏÖ·½·¨Ò²¶¼ºÜ¼òµ¥¡£
 
·½·¨Ò»£ºMS×é¼þ
ÕâÀïÒ²²»ÓÃÏê½âÁË£¬Ïà¹ØÇë¿´£º
http://www.microsoft.com/china/msdn/library/webservices/asp.net/URLRewriting.mspx
Ó÷¨ºÜ¼òµ¥£¬Ö»ÐèÒª°Ñ×é¼þURLRewriter.dll¿½µ½Ó¦ÓóÌÐòµÄbinĿ¼Ï£¬È»ºóÔÚweb.configϼÓÈëÈçÏ´úÂ룺
ÔÚ<configuration></configuration>ÖмÓÈ룺
     <configSections>
          <sectionname="RewriterConfig"type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
     </configSections>
    
     <RewriterConfig>
          <Rules>
              <RewriterRule>
                   <LookFor>~/(\d{4})/(\d{2})/Default\.aspx</LookFor>
                   <SendTo>~/Default.aspx?ID=$1</SendTo>
              </RewriterRule>
          </Rules>
     </RewriterConfig>
È»ºóÔÚ<system.web></system.web>ÖмÓÈ룺
<httpHandlers>
   <addverb="*"path="*.aspx"
        type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>
 
×îºóÔÚµØÖ·À¸ÉϼüÈ룺http://localhost/Test/2004/12/News.aspx
Ч¹û³öÀ´ÁË¡£
ÉÏÃæµÄ<LookFor>~/(\d{4})/(\d{2})/News\.aspx</LookFor>Õâ¾äÕâÕýÔò±í´ïʽURL£¬¼´±»ÖØдµÄURL£¬¶ø


Ïà¹ØÎĵµ£º

ASP.NET¶ÁÈ¡EXCELÎļþµÄÈýÖÖ·½·¨


1.·½·¨Ò»£º²ÉÓÃOleDB¶ÁÈ¡EXCELÎļþ£º
°ÑEXCELÎļþµ±×öÒ»¸öÊý¾ÝÔ´À´½øÐÐÊý¾ÝµÄ¶ÁÈ¡²Ù×÷£¬ÊµÀýÈçÏ£º
public DataSet ExcelToDS(string Path)
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(str ......

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

//Á¬½ÓÊý¾Ý¿â
        string myStr = CODE.DbHelperSQL.connectionString;
        SqlConnection myConn = new SqlConnection(myStr);
        myConn.Open();
      &nbs ......

asp.netÖÐʹÓûùÓÚ½ÇÉ«roleµÄFormsÑéÖ¤

asp.netÖÐʹÓûùÓÚ½ÇÉ«roleµÄFormsÑéÖ¤£¬´óÖ¾­¹ý¼¸ÏÂËIJ½£º
1.ÅäÖÃϵͳweb.config
timeout="20" path="/" />
ÆäÖÐ ±íʾ±¾Ó¦ÓóÌÐò²ÉÓÃFormsÑéÖ¤·½Ê½¡£
1). ±êÇ©ÖеÄname±íʾָ¶¨ÒªÓÃÓÚÉí·ÝÑéÖ¤µÄ HTTP Cookie¡£Ä¬ÈÏÇé¿öÏ£¬name µÄÖµÊÇ .ASPXAUTH¡£²ÉÓôËÖÖ·½Ê½ÑéÖ¤Óû§ºó,ÒÔ´ËÓû§µÄÐÅÏ¢½¨Á¢Ò»¸öFormsAuthenticati ......

ASP.NET MD5+SHA1 ¼ÓÃÜ

-----MD5¼ÓÃÜ
 
//ʹÓüÓÃÜ·þÎñÌṩ³ÌÐò(CSP) ÌṩµÄʵÏÖ£¬¼ÆËãÊäÈëÊý¾ÝµÄMD5 ¹þÏ£Öµ
            MD5CryptoServiceProvider crypto = new MD5CryptoServiceProvider();
            //½«×Ö·û´®× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ