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

ASP.NET ViewState ¼ò½é

  ASP.NET ViewState ÊÇÒ»ÖÖеÄ״̬·þÎñ£¬¿É¹©¿ª·¢ÈËÔ±»ùÓÚÿ¸öÓû§À´¸ú×Ù UI ״̬£¬¸Ã¸¨ÖúÊý¾Ý±»´æ´¢ÔÚÒ»¸öÃûΪ __VIEWSTATE µÄÒþ²Ø×Ö¶ÎÖС£
    µ±È»£¬ ViewState ÔÚ ASP.NET ÖÐÓиöÖØÒªµÄ½ÇÉ«¡£Èç¹ûʹÓÃÇ¡µ±£¬ËüÄܹ»¼ò»¯Ò³Ã濪·¢£¬¸Ä½øÓû§ÓëÕ¾µãµÄ½»»¥¡£Èç¹ûÖÃÖ®²»Àí£¬ËüÄܹ»ÏÔÖøÔö¼ÓÕ¾µãÏìÓ¦´óС£¬ÔÚÁ¬½ÓËÙ¶ÈÂýµÄÇé¿öÏÂ,ʹÄúµÄÏìӦʱ¼ä¸ü¼Ó»ºÂý¡£ÒòΪä¯ÀÀÆ÷µÄÿ´Î»Ø·¢¶¼»áµ¼ÖÂViewState Öð½¥Ôö¼ÓÄúµÄÒ³Ãæ´óС£¬´Ó¶øµ¼ÖÂÐÔÄÜÎÊÌâ¡£Òò´Ë£¬ASP.NET 2.0 µÄ·¢²¼´øÀ´ÁË ViewState »úÖƵÄһЩ¸Ä½ø£¬ÕâʹµÃ ViewState ʹÓøü¼òµ¥£¬ÓÖ²»»á·À°­Õ¾µãÐÔÄÜ¡£ÕâЩ¸Ä½ø°üÀ¨£º¼õÉÙ±àÂëÊýÁ¿£¬²ÉÓÿؼþ״̬´ÓÄÚÈÝÖзÖÀë³öÐÐΪ״̬£¬ÒÔ¼°ÖÇÄܼ¯³ÉÊý¾Ý°ó¶¨¿Ø¼þ¡£Äã¿ÉÒÔÔÚ²»ÐèҪά»¤¿Ø¼þ״̬µÄÇé¿öÏÂͨ¹ý½ûÓõĿؼþ£¨EnableViewState = false £©½â¾öÕâ¸öÎÊÌâ¡£ È»¶ø£¬ºÜ¶àÇé¿öϱ£³Ö¿Ø¼þµÄ״̬ÊDZØÐèµÄ£¬Ñ¹ËõµÄViewStateÓÐÖúÓÚÌá¸ßÐÔÄÜ¡£
ÏÂÔØʾÀýÏîÄ¿¡£
ASPNET_ViewState.rar 34KB.
 
·½·¨Ò»£ºÊ¹ÓÃSystem.IO.Compression
    System.IO.Compression ÃüÃû¿Õ¼ä°üº¬Ìṩ»ù±¾µÄÁ÷ѹËõºÍ½âѹËõ·þÎñµÄÀà¡£
    ´ËÃüÃû¿Õ¼ä°üº¬2¸öÀà·Ö±ðΪ£º
DeflateStream ÌṩÓÃÓÚʹÓà Deflate Ë㷨ѹËõºÍ½âѹËõÁ÷µÄ·½·¨ºÍÊôÐÔ¡£
GZipStream ÌṩÓÃÓÚѹËõºÍ½âѹËõÁ÷µÄ·½·¨ºÍÊôÐÔ¡£
    ÔÚÏÂÃæµÄÑÝʾ´úÂëÖУ¬ÎÒÃÇ´´½¨Ò»¸öViewStateCompressionÀ࣬°üº¬2¸ö·½·¨£¬²¢¶¼·µ»Øbyte[]Êý¾Ý:
    1.GZipStream°æµÄѹËõ/½âѹËõ
namespace ASPNET_ViewState.Code {
public class ViewStateCompression {
public ViewStateCompression() {
//
// TODO: Add constructor logic here
//
}
// ѹËõ
public static byte[] Compress( byte[] data ) {
MemoryStream output = new MemoryStream();
GZipStream gzip = new GZipStream( output,
CompressionMode.Compress, true );
gzip.Write( data, 0, data.Length );
gzip.Close();
return output.ToArray();
}
// ½âѹËõ
public static byte[] Decompress( byte[] data ) {
MemoryStream input = new MemoryStream(


Ïà¹ØÎĵµ£º

JQueryµ÷ÓÃasp.netºǫ́·½·¨

ÀûÓÃJQueryµÄ$.ajax()¿ÉÒԺܷ½±ãµÄµ÷ÓÃasp.netµÄºǫ́·½·¨¡£
ÏÈÀ´¸ö¼òµ¥µÄʵÀýÈÈÈÈÉí°É¡£
1¡¢ÎÞ²ÎÊýµÄ·½·¨µ÷ÓÃ
asp.net code£º
using System.Web.Script.Services;
[WebMethod]
public static string SayHello()
{
return "Hello Ajax!";
}
×¢Ò⣺1.·½·¨Ò»¶¨Òª¾²Ì¬·½·¨£¬¶øÇÒÒªÓÐ[WebMethod]µÄÉùÃ÷
JQuery ......

ASP.NET Ò³ÃæʼþÖ´ÐÐ˳Ðò ÊÕ²Ø

ASP.NET Ò³ÃæʼþÖ´ÐÐ˳Ðò ÊÕ²Ø
¹ý³ÌÃèÊö
ÏÂÃæÊÇASP.NETÒ³Ãæ³õʼµÄ¹ý³Ì:
1. Page_Init();
2. Load ViewState;
3. Load Postback data;
4. Page_Load();
5. Handle control events;
6. Page_PreRender();
7. Page_Render();
8. Unload event;
9. Dispose method called;
ÏÂÃæ¶ÔÆäÖеÄһЩ¹ý³Ì×÷ÏÂÃèÊö£º
1. Pa ......

asp.netÃæÊÔÌâÊÕ¼¯ Ä㶼»áÁËÂð

1.newÓм¸ÖÖÓ÷¨
µÚÒ»ÖÖ:new Class();
µÚ¶þÖÖ:¸²¸Ç·½·¨
public new XXXX(){}
µÚÈýÖÖ:new Ô¼ÊøÖ¸¶¨·ºÐÍÀàÉùÃ÷ÖеÄÈκÎÀàÐͲÎÊý¶¼±ØÐëÓй«¹²µÄÎÞ²ÎÊý¹¹Ô캯Êý¡£
2.ÈçºÎ°ÑÒ»¸öarray¸´ÖƵ½arrayListÀï
foreach( object o in array )arrayList.Add(o);
3.datagrid.datasous ......

asp.net½Ì³Ì:WPFͼÐÎϵͳ

  ÔÚWindows NTÖУ¬Í¼ÐζàýÌåϵͳ»ùÓÚ²ã´Î½á¹¹¡£Ó¦ÓóÌÐòÓ붥²ãµÄAPI£¨Êµ¼ÊÉÏÊǶà¸öÓû§Ä£Ê½µÄϵͳDLL£¬±ÈÈçGDI32.DLL£©½»»¥£¬ÕâЩϵͳDLL×îÖÕ»áͨ¹ýϵͳ·þÎñµ÷Óô¦ÓÚÄÚºËģʽµÄϵͳ·þÎñ¡£
NTϵͳµÄÏêϸÐÅÏ¢¿É²Î¿¼¡¶Windows ͼÐαà³Ì¡·µÄµÚÒ»¡¢¶þÕ¡£ÔÚWindows VistaÖУ¬Í¼ÐÎϵͳÒѾ­ÒƳöÁËÄÚºËģʽ£¬²¢ÓÐ×Ô¼ºµÄ¿Õ¼ä ......

VS ASP.NETÉèÖöϵã ÎÞ·¨µ÷ÊÔ

VS ASP.NETÉèÖöϵã ÎÞ·¨µ÷ÊÔ
ÎҵĿª·¢¹¤¾ßVS2005 IEä¯ÀÀÆ÷ÊÇ8.0£¬ÉèÖöϵãÖ®ºó²»Äܵ÷ÊÔ¡£
Ò»°ã»áÓÐÁ½ÖÖ¿ÉÄÜ£º
Ò»¡¢web.config debugÊôÐÔÉèÖÃΪTRUE
<compilation debug="true" />
¶þ¡¢IE8µÄÎÊÌâ
ÐÞ¸Ä×¢²á±í£ºHKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
ÐÂÔöÃû³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ