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

ʹÓÃJavascript,CSSºÍAjax´´½¨ASP.NET×Ô¶¨Òå¿Ø¼þ

ÔÚVisual StudioÖУ¬ËùÓеÄASP.NET 2.0¿Ø¼þ¶¼ÊÇ×Ô¶¨Òå¿Ø¼þ£¬´´½¨×Ô¼ºµÄ×Ô¶¨Òå¿Ø¼þÒ»°ãÐèÒªÍê³ÉÒÔÏÂÈý²½¡£
(1)ÔÚÕ¾µãAPP_CodeÏ´´½¨Ò»¸öÐÂÀࣻ
(2)ÐÞ¸ÄÕâ¸öÀ࣬ÈÃËü³ÉΪWebControlÀà(°üº¬ÔÚSystem.Web.UI.WebControlsÃüÃû¿Õ¼ä)µÄÅÉÉúÀࣻ
(3)ÖØд»ùÀà(¼´WebControlÀà)µÄRenderContents()·½·¨¡£
ÏÂÃæÊÇÒ»¸ö×î¼òµ¥µÄASP.NET¿Ø¼þ£¬ËüµÄ¹¦ÄÜÖ»ÓÐÒ»¸ö£¬ÏÔʾ"Hellow World"¡£
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace myControls
{
  public class HelloWorld : WebControl
  {
    protected override void RenderContents(HtmlTextWriter writer)
    {
      writer.Write("Hello World");
    }
  }
}
    ×Ô¶¨Òå¿Ø¼þ´´½¨ºÃÖ®ºó£¬ÓÐÈýÖÖ·½·¨½«ÆäÌí¼Óµ½ÍøÒ³ÖС£
    µÚÒ»ÖÖÑ¡ÔñÊÇÊ×ÏÈÔÚaspxÎļþÌí¼Ó×¢²á¿Ø¼þµÄ´úÂ룺
  
<%@ Register TagPrefix="custom" Namespace="myControls" %>
    ÆäÖÐTagPrefixÊôÐÔµÄÖµ¿ÉËæÒâÑ¡È¡£¬NamespaceÊôÐÔµÄÖµ±ØÐëÓëÄã´´½¨µÄ×Ô¶¨Òå¿Ø¼þÒ»Ö£¬È»ºóÔÚ¸ÃÒ³µÄÈÎÒâλÖþù¿ÉÒýÓô˿ؼþ ¡£
   
<custom:HelloWorld ID="HelloWorld1" runat="server" />
    µÚ¶þÖÖÑ¡ÔñÊÇÔÚWeb.ConfigÎļþÖÐ×¢²á´Ë¿Ø¼þ£¬ÕâÑùÄã¾Í¿ÉÒÔÔÚËùÓеÄaspxÒ³ÃæÖÐÒýÓô˿ؼþ¡£Ïà¹ØÅäÖÃÈçÏ£º
<pages>
  <controls>
    <add tagPrefix="custom" namespace="myControls"/>
  </controls>
</pages>    
    ×îºóÒ»ÖÖ·½Ê½Êǽ«¿Ø¼þÌí¼Óµ½Visual Studio¹¤¾ßÏäÖУ¬Ê¹ÓÃʱֱ½ÓÍÏÀ­µ½ÍøÒ³ÖС£µ«Õâ¸öʱºòÄã²»ÄÜÔÚAPP_CodeÎļþ¼ÐÏ´´½¨Õâ¸ö¿Ø¼þ£¬¶ø±ØÐ뽫Æä´´½¨Îª¶ÀÁ¢µÄ³ÌÐò¼¯£¬¾ßÌå·½·¨±¾ÎĺóÃ潫»áÌáµ½¡£´´½¨ºÃ¶ÀÁ¢µÄ×Ô¶¨Òå¿Ø¼þºó£¬ÓÒ¼üµ¥»÷Visual Studio¹¤¾ßÏ䣬ѡÔñ“Ñ¡ÔñÏ¬Ö®ºó»áµ¯³öÒ»¸ö¶Ô»°¿ò£¬´ÓÖÐÑ¡ÔñÄã×Ô¼ºµÄ³ÌÐò¼¯£¬×Ô¶¨Òå¿Ø¼þ½«×Ô¶¯³öÏÖÔÚ¹¤¾ßÏäÉÏ¡£  
ǶÈëJavascript
    ΪÁË»ñµÃ¸üºÃµÄ¿Í»§¶ËЧ¹û£¬ÎÒÃÇÐèÒªÒýÈëJavascriptºÍCSSÑùʽ±í¡£ÔÚASP.NETÖУ¬ÓÐÒ»¸öÀà½Ð×÷ClientScriptManager£¬¿ÉÒԺܷ


Ïà¹ØÎĵµ£º

AjaxÖÐͬ²½ÓëÒì²½Çø±ðµÄÖ±¹ÛÐÔ˵Ã÷

ajax.open·½·¨ÖУ¬µÚ3¸ö²ÎÊýÊÇÉèͬ²½»òÕßÒì²½¡£prototypeµÈjsÀà¿âÒ»°ã¶¼Ä¬ÈÏΪÒì²½£¬¼´ÉèΪtrue¡£
ÏÈ˵ÏÂͬ²½µÄ
Çé¿öÏ£¬js»áµÈ´ýÇëÇ󷵻أ¬»ñÈ¡status¡£²»ÐèÒªonreadystatechangeʼþ´¦Àíº¯Êý¡£
¶øÒì²½ÔòÐèÒª
onreadystatechangeʼþ´¦Àí£¬ÇÒֵΪ4ÔÙÕýÈ·´¦ÀíÏÂÃæµÄÄÚÈÝ
......

CSS´¦Àíб½Çµ¼º½ÌõµÄÒ»¸öÀý×Ó [Ô´Âë].txt

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>www.zishu.cn</t ......

³¹µ×Ū¶®CSSºÐ×Óģʽ(DIV+CSS)

³¹µ×Ū¶®CSSºÐ×Óģʽ(DIV+CSS)
·Ç³£ºÃµÄDIV²¼¾ÖÔ­ÀíÓëʵÀý½Ì³Ì,¶ÔWEB±ê×¼²¼¾ÖÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ¿´¿´ÒÔÏÂÄÚÈÝ:
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×Óģʽһ:DIV²¼¾Ö¿ìËÙÈëÃÅ
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×Óģʽ¶þ:µ¼º½À¸ÊµÀýÏê½â
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×ÓģʽÈý:¸¡¶¯µÄ±íÑݺÍÇå³ýµÄ×ÔÊö[1]
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×ÓģʽÈý:¸¡¶¯µÄ±íÑݺÍÇå³ý ......

×îÈ«µÄCSSä¯ÀÀÆ÷¼æÈÝÎÊÌâ

CSS¶Ôä¯ÀÀÆ÷µÄ¼æÈÝÐÔÓÐʱÈÃÈ˺ÜÍ·ÌÛ,»òÐíµ±ÄãÁ˽⵱Öеļ¼ÇɸúÔ­Àí,¾Í»á¾õµÃÒ²²»ÊÇÄÑÊÂ,´ÓÍøÉÏÊÕ¼¯ÁËIE7,6ÓëFireofxµÄ¼æÈÝÐÔ´¦Àí·½·¨²¢ÕûÀíÁËÒ»ÏÂ.¶ÔÓÚweb2.0µÄ¹ý¶È,Ç뾡Á¿ÓÃxhtml¸ñʽд´úÂë,¶øÇÒDOCTYPE Ó°Ïì CSS ´¦Àí,×÷ΪW3CµÄ±ê×¼,Ò»¶¨Òª¼Ó DOCTYPEÉùÃû.
 
CSS¼¼ÇÉ
1.divµÄ´¹Ö±¾ÓÖÐÎÊÌâ
vertical-align:middl ......

ASP.NET CookieʹÓÃ


1.ʲôÊÇcookie?
cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæÓû§ÇëÇó£¬ÔÚweb·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Óû§Ã¿´Î·ÃÎÊÕ¾µãµÄʱºò£¬
webÓ¦ÓóÌÐò¶¼¿ÉÒÔ¶ÁÈ¡cookie°üº¬µÄÐÅÏ¢¡£
¼ÙÉèÔÚÓû§ÇëÇóÄúµÄÍøÕ¾µÄij¸öÒ³Ãæʱ£¬ÄúµÄÓ¦ÓóÌÐò²»½öÊÇ·µ»ØÇëÇóµÄÒ³Ã档ͬʱҲ·µ»ØÒ»¸ö°üº¬ÈÕÆÚ
ºÍʱ¼äµÄcookie¡£Óû§µÄä¯ÀÀÆ÷ÔÚ»ñµÃÒ³ÃæµÄͬʱҲ»ñµÃ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ