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

asp.net mvc¿ò¼ÜÖÐjsonÐòÁл¯µÄ¿ØÖÆ

ÏÈ¿´ÏÂÃæµÄÒ»¶Î´úÂ룺
 public class UserTest
        {
           public int age { set; get;
}          
¡¡¡¡¡¡¡¡ public string name { set; get; }         }
ÕâÊÇ×¼±¸ jsonÐòÁл¯µÄÀ࣬ÓÃmvc¿ò¼ÜÌṩµÄjson·½·¨£¬ºÜ¿ì¾Í¿ÉÒÔÍê³É£¬´úÂëÈçÏ£º
  public ActionResult TestAjax(int? page)
        {
           
UserTest test = new UserTest() { age = 20, name = "aa" };
            return
Json(test)
        }
ÏÖÔÚÎÊÌâÊÇÒª¿ØÖÆÐòÁл¯µÄÊôÐÔ£¬±ÈÈç˵ÏëÈÃnameÐòÁл¯£¬age²»ÐòÁл¯£¬ÈçºÎ×öµ½¡£
NonSerializedºÍXmlIgnore¶¼²»¿ÉÒÔ¡£ÓÖÊÔÁËÏÂÓÃ[DataContract]Ò²²»¿ÉÒÔ£¬Í»È»Ï뵽Ϊʲô²»¿´¿´jsonʵÏÖµÄÔ´ÂëÁË£¬´ò¿ªmvc¿ò¼ÜÔ´Â룬ÕÒµ½json·½·¨µÄÔ´ÂëÈçÏ£º
 public override void ExecuteResult(ControllerContext context)
{
            if (context == null) {
                throw new
ArgumentNullException("context");
            }
           
HttpResponseBase response = context.HttpContext.Response;
            if
(!String.IsNullOrEmpty(ContentType)) {
                response.ContentType =
ContentType;
            }
            else {
               
r


Ïà¹ØÎĵµ£º

asp.net ¼òÃ÷°²×°ÊÖ²á


ASP.NetÓÖ½ÐASP+
£±¡¢ÏµÍ³ÒªÇó
=====================
· CPU: Intel Pentium II-class 300 MHz (Intel Pentium III-class 600 MHz recommended)
· RAM: 96 MB (128 MB recommended)
· Available hard disk space (for install): 250 MB
· Available hard disk space (post install) ......

ASP.NET »·¾³ÏµÄÒ³ÃæÑéÖ¤¿Ø¼þ

 
ÑéÖ¤¿Ø¼þÓÃÓÚÑéÖ¤Óû§µÄÊäÈ룬ÀûÓÃÕâЩ¿Ø¼þ£¬¿ª·¢ÈËÔ±¿ÉÒÔÇáËɵÄʵÏÖ¶ÔÓû§ÊäÈëµÄÑéÖ¤¡£ASP.NETÌṩÁËÁùÖÖÑéÖ¤¿Ø¼þ¡£
1.Required Field Validator£ºÑéÖ¤ÊäÈëÊÇ·ñΪ¿ÕµÄ¿Ø¼þ¡£
Ö÷ÒªÊôÐÔ£º
Control To Validate£º±íʾҪ½øÐмì²éµÄ¿Ø¼þID¡£´ËÊôÐÔ±ØÐëÉèÖÃΪÊäÈë¿Ø¼þµÄID£¬·ñÔò»á·¢ÉúÒì³£¡£ÁíÍâ¸ÃIDËù´ú±íµÄ¿Ø¼þ± ......

asp.net¿Ø¼þ¿ª·¢»ù´¡(1)

asp.net±¾ÉíÌṩÁËºÜ¶à¿Ø¼þ,Ìṩ¸øÎÒÃÇÕâЩ±È½ÏÀÁ¶èµÄÈËʹÓÃ,ÎÒÈÏΪ¿Ø¼þµÄ×÷ÓþÍÔÚ´Ë,ÒòΪÎÒÃDz»ÏëÖØ¸´¹¤×÷,ËùÒÔÒª´´½¨Ëü,Õâ¸ö±¾Éí±ãÊÇÒ»¸öÐèÇóµÄ¹ØÏµ,ËùÒÔѧϰ¿Ø¼þ¿ª·¢ºÜÓÐÒâ˼.
wroxÍøÕ¾ÉÏÓб¾Êé Professional ASP.NET 2.0 Server Control and Component Development
ÏÖÔÚ»¹Ã»Óгö°æ,µ«ÍøÕ¾ÉϷųöÁË´úÂë,ËùÒÔÕýºÃÏÂÔØ¹ý ......

ASP.NET¿çÒ³Ãæ´«Öµ¼¼ÇÉ×ܽá

¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬Òý·¢Á˺ܶàÌÖÂÛ¡£¿´À´ÓкܶàÈ˹Ø×¢Õâ¸ö£¬ÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1.  ʹÓÃQueryString±äÁ¿
QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´«µ ......

ASP.NetÖг£¼ûµÄϵͳ¶ÔÏó

page£ºpage¶ÔÏóÊÇÖ¸Ò³Ãæ×ÔÉíµÄ·½Ê½£¬ÔÚÕû¸öÒ³ÃæµÄÖ´ÐÐÆÚÄÚ£¬¶¼¿ÉÒÔÓøöÔÏó¡£
Request£º´Ë¶ÔÏó·â×°ÁËÓÉWebä¯ÀÀÆ÷»òÕ߯äËû¿Í»§¶ËÉú³ÉµÄHTTPÇëÇóµÄϸ½Ú£¬Ìṩ´Óä¯ÀÀÆ÷¶ÁÈ¡ÐÅÏ¢»òÕß¶ÁÈ¡¿Í»§¶ËÐÅÏ¢µÈ¹¦ÄÜ£¬ÓÃÓÚÒ³ÃæÇëÇóÆÚ¡£
Response£º´Ë¶ÔÏó·â×°ÁË·µ»Øµ½HTTP¿Í»§¶ËµÄÊä³ö£¬ÌṩÏòä¯ÀÀÆ÷Êä³öÐÅÏ¢»òÕß·¢ËÍÖ¸ÁÓÃÓÚÒ³ÃæµÄÖ´ÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ