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

c# asp.net ×Ö·û´®¼ÓÃܽâÃܵÄÀà


using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//CryptographyÃÜÂëÊõ   
namespace DAL   
{   
    public class Encry   
    {   
        public Encry() { }  
 
        #region AES¼ÓÃÜ   
  
        public static string Encrypt(string toEncrypt)   
        {   
            byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");   
            byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);   
  
            RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;   
            rDel.Key = keyArray;   
            rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;   
            rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;   
  
            ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;   
     &nbs


Ïà¹ØÎĵµ£º

asp.netÖÐmvc·ÖÒ³Àà

·ÖÒ³´úÂëÈçÏ£¨PageHelper.cs£©£º
´úÂë
  1 using System;
  2 using System.Collections.Generic;
  3 using System.Collections.Specialized;
  4 using System.Linq;
  5 using System.Web;
   ......

asp.netºǫ́Óëǰ̨µÄ»¥Ïàµ÷ÓÃ

Ò».ºǫ́µ÷ÓÃǰ̨
1.Page.ClientScript.RegisterStartupScript(type,"",script);
Àý:
string script = string.Format("<script>alert('Wrong');</script>");
Page.ClientScript.RegisterStartupScript(GetType(), "Load", script);
2.¶ÔÏó.Attributes.Add("ʼþ","script")
Àý:
e.Row.Attributes.Add("on ......

ASP.netÖеÄvalidaterequest

Õâ¸öÊôÐÔÊÇÓÃÀ´ÑéÖ¤¿Í»§¶ËÓû§µÄÊäÈëµÄ,ÓÃÀ´ÑéÖ¤Óû§µÄÊäÈëÖÐÊÇ·ñÓÐΣÏÕ×Ö·ûµÄ,Õâ¸öÊôÐÔµÄĬÈÏֵΪtrue,΢ÈíÖ®ËùÒÔÕâô×öÊÇΪÁËÌá¸ßasp.net³ÌÐòµÄ°²È«ÐÔ,ËùÒԺܶà³ÌÐòÔ±¼´Ê¹²»ÖªµÀÔõôÀ´·ÀÓùºÚ¿ÍµÄ¹¥»÷,asp.netµÄһЩĬÈÏÊôÐÔµÈÄÚÈÝÒѾ­¶Ô°²È«½øÐÐÁË¿ØÖÆ,ÕâÒ²ÊÇΪʲôasp.netµÄ³ÌÐòÏà¶ÔÀ´Ëµ±È½Ï°²È«µÄÔ­Òò!
¡¡¡¡¼ÈÈ»Õâ¸öÊô ......

asp.netÐÔÄÜÓÅ»¯×ܽá ÐÄÈçֹˮ

1. C#ÓïÑÔ·½Ãæ
1.1 À¬»ø»ØÊÕ
¡¡À¬»ø»ØÊÕ½â·ÅÁËÊÖ¹¤¹ÜÀí¶ÔÏóµÄ¹¤×÷£¬Ìá¸ßÁ˳ÌÐòµÄ½¡×³ÐÔ£¬µ«¸±×÷ÓþÍÊdzÌÐò´úÂë¿ÉÄܶÔÓÚ¶ÔÏó´´½¨±äµÃËæÒâ¡£
¡¡1.1.1 ±ÜÃâ²»±ØÒªµÄ¶ÔÏó´´½¨
¡¡ÓÉÓÚÀ¬»ø»ØÊյĴú¼Û½Ï¸ß£¬ËùÒÔC#³ÌÐò¿ª·¢Òª×ñÑ­µÄÒ»¸ö»ù±¾Ô­Ôò¾ÍÊDZÜÃâ²»±ØÒªµÄ¶ÔÏó´´½¨¡£ÒÔÏÂÁоÙһЩ³£¼ûµÄÇéÐΡ£
¡¡1.1.1.1 ±ÜÃâÑ­»·´´½¨¶ÔÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ