¡¡¡¡
ËÄ¡¢ Atlas¿ò¼Ü¸ÅÒª¡¡¡¡¸Ã¿ò¼Ü°üº¬ÁËMicrosoft.Web.Atlas.dll×°Å伯£¬Ëü°üº¬ÁË·þÎñÆ÷¶ËÍйܵĺͿͻ§¶ËJavaScript API¡£
ÏÂͼ3չʾÁËVisual StudioµÄ¶ÔÏóä¯ÀÀÆ÷´°¿ÚÖеÄAtlasÃüÃû¿Õ¼ä¡£
 ͼ3.ÔÚMicrosoft.Web.Atlas.dll×°Å伯ÖеÄÃüÃû¿Õ¼ä |
¡¡¡¡(Ò») ·þÎñÆ÷¶Ë¿â
¡¡¡¡ÔÚͼ3¿ò¼ÜÖÐչʾµÄÃüÃû¿Õ¼äÖÐÌṩµÄ¸÷ÖÖÀൣÈηþÎñÆ÷¶Ë¿â¡£¸Ã¿âÌṩÓë¿Í»§¶ËJavaScript APIÒ»Æð¹¤×÷µÄÅäÖá¢Web·þÎñºÍ¿Ø¼þÀà¡£
¡¡¡¡¸ÃWeb·þÎñÀà°Ñasp.netÌØÕ÷£¬ÀýÈçÈÏÖ¤¡¢ÂÖÀª¡¢ÎÄ»¯ºÍÈ«Çò»¯µÈÐÅÏ¢£¬±©Â¶¸ø¿Í»§¶ËJavaScript´úÂëÒÔ±ã½øÐÐÒì²½´æÈ¡¡£ÁíÒ»·½Ã棬Atlas·þÎñÆ÷¿Ø¼þÀ࣬ÔÚÉú³ÉÕâЩ¿Ø¼þʱÄܹ»¡°·¢³ö¡±JavaScript£¬´Ó¶øÊ¹¿ª·¢ÕßÃâÓÚ±àд¸´ÔӵĿͻ§¶Ë½Å±¾¡£
¡¡¡¡·þÎñÆ÷¶Ë¿â»¹ÌṩAtlas extender¿Ø¼þ£¬ËüÄܹ»Ìṩ¸øasp.net¿Ø¼þÆäËü¿Í»§¶Ë¹¦ÄÜ¡£
¡¡¡¡ÏÂÁпؼþÊÇ·þÎñÆ÷¶Ë¿âµÄÒ»²¿·Ö£º
¡¡¡¡¡¤ ScriptManager¿Ø¼þ£ºÌṩÁËÔÚÒ»¸öWebÒ³ÃæÉϵÄËùÓеÄAtlasÌØÕ÷£¬ÀýÈ粿·ÖÒ³Ãæ¸üУ¬¶¨ÖƺͿâ¿Í»§¶Ë½Å±¾²Î¿¼ºÍÉú³É£¬Õë¶Ô¿Í»§¶ËÒì²½´æÈ¡µÄWeb·þÎñÒýÓ㬶øÒì³£´¦ÀíÊÇÓɸÿؼþ¹ÜÀíµÄ¡£Ã¿Ò»¸öÐèҪʵÏÖAtlas¹¦ÄܵÄasp.net WebÒ³Ãæ»òÓû§¿Ø¼þ¶¼ÐèÒªÉùÃ÷Õâ¸ö¿Ø¼þµÄµ¥¸öʵÀý¡£ÎªÁËÔÚÒ»¸öÒ³ÃæÉÏʹÓÃScriptManager¿Ø¼þ£¬Äã¿ÉÒÔʹÓÃÏÂÁÐÉùÃ÷ÐÔÓï·¨£º
£¼atlas:ScriptManager ID="ScriptManager instance identifier" £¼!--enables or disables partial page rendering using UpdatePanel controls--£¾ EnablePartialRendering="boolean true or false"
£¼!--If set to false the AtlasRuntime.js file£¬ which provides basic 'Atlas functionality is referenced by default. If set to true the Atlas.js file£¬ which provides the entire Atlas feature set is referenced by default. The default value is true--£¾ EnableScriptComponents="boolean true or false"
OnPageError="invoked event handler on PageError " runat="server" £¾
£¼Scripts£¾ £¼atlas:ScriptReference £¼!--to reference custom script files--£¾ Path="path to .js file" £¼!--to reference client library files that are not included automatically--£¾ ScriptName="name of script file e.g. AtlasUIGlitz"/£¾ £¼/Scripts£¾ £¼Services£¾ £¼atlas:ServiceReference £¼!--If set to true the control generates a JavaScript proxy object for asynchronous access for the referenced Web Service. If set to false it doesn't.--£¾ GenerateProxy="boolean true or false"
Path="path to a Web service (e.g. asmx) file" Type="Web service class name" /£¾ £¼/Services£¾ £¼ErrorTemplate£¾ £¼!--Markup for rendering unhandled exception messages for asynchronous postback. Partial rendering should be enabled. The template has to define an input button with an attributes ID of value "okButton" and runat of value "server" to close the message. --£¾ £¼/ErrorTemplate£¾ £¼/atlas:ScriptManager£¾ |
¡¡¡¡¡¤ ScriptManagerProxy¿Ø¼þ£º¶ÔÓÚÄÚÈÝÒ³ÃæºÍÓû§¿Ø¼þÀ´Ëµ£¬Èç¹ûËüÃǵĸ¸Ò³ÃæÒѾӵÓÐÒ»¸ö¶¨ÒåºÃµÄScriptManager¿Ø¼þ£¬ÄÇôÕâ¸ö¿Ø¼þ¿ÉÒÔÓÃÓڲο¼ÆäËü½Å±¾ºÍ·þÎñ¡£µ«ÊÇ£¬¸Ã¿Ø¼þ²»Äܱ»ScriptManager¿Ø¼þÓÃÓÚɾ³ý½Å±¾ºÍ·þÎñ²Î¿¼¡£
¡¡¡¡¡¤ UpdatePanel¿Ø¼þ£ºµ±Í¨¹ýScriptManager¿Ø¼þÖ§³ÖÒ»¸öWebÒ³ÃæµÄ²¿·ÖÉú³Éʱ£¬UpdatePanel¿Ø¼þ¿ÉÒÔÓÃÓÚÖ¸¶¨Ò³ÃæÉϵÄÇøÓò¡ªÄܹ»±»¶ÀÁ¢µØÊ¹ÓÃÒì²½»ØÀ¡½øÐиüС£ÏÂÁÐÉùÃ÷ÐÔÓï·¨ÓÃÓÚÔÚÒ»¸öWebÒ³ÃæÖж¨ÒåÒ»¸öUpdatePanel¿Ø¼þ£º
£¼atlas:UpdatePanel ID="UpdatePanel instance identifier" £¼!-- If Mode attribute is set to Always asynchronous postbacks triggered within the region update its contents automatically; If it is set to Conditional the region is updated in response to a registered trigger --£¾ Mode="Always|Conditional" £¼!-- If RenderMode attribute is set to Block the content within the UpdatePanel is rendered using a £¼DIV£¾ element; If it is set to Inline a £¼SPAN£¾ element is used as a container for the content within the UpadatePanel --£¾ RenderMode="Block|Inline" runat="server"£¾ £¼ContentTemplate£¾ £¼!-- Content to be rendered within the region--£¾ £¼/ContentTemplate£¾ £¼!a€¡±A Collection of objects that trigger an asynchronous update on the panel. These Objects don't need to be declared within the region. --£¾ £¼Triggers£¾
£¼ControlValueTrigger ControlID="object instance identifier" PropertyName="property value that triggers the update"/£¾ £¼ControlEventTrigger ControlID="object instance identifier" EventName="the name of the event that triggers the update"/£¾ £¼/Triggers£¾ £¼/atlas:UpdatePanel£¾ |
¡¡¡¡¡¤ TimerControl£ºËüÔÚ¿Í»§¶ËÉú³ÉÒ»¸ö¶¨Ê±Æ÷£¬Óɸÿͻ§¶ËÒÔÖ¸¶¨µÄʱ¼ä¼ä¸ô´¥·¢Òì²½»ØÀ¡¡£¸Ã¿Ø¼þͨ³£ÓÃ×÷Ò»¸öÒªÇó¶¨Ê±¸üÐÂÄÚÈݵÄUpdatePanelat¿Ø¼þµÄ´¥·¢Æ÷¿Ø¼þ¡£ÎªÁËÒÔÉùÃ÷·½Ê½¶¨ÒåÕâ¸ö¿Ø¼þ£¬ÐèҪʹÓÃÏÂÁÐÓï·¨£º
£¼atlas:TimerControl Enabled="boolean true or false" ID="Control instance identifier" £¼!--If the Enabled property is set to true the control is defined on the client-side. If not it isn't.--£¾ Interval="Interval in milliseconds. the default is 60000." OnTick="invoked server-side event handler name" runat="server"/£¾ |
¡¡¡¡¡¤ Extender¿Ø¼þ£ºËüÃÇʹÓÃÔö¼ÓµÄ¿Í»§¶Ë¹¦ÄÜÀ©Õ¹asp.net¿Ø¼þ¡£ÀýÈ磬AutoCompleteExtender¿Ø¼þÖ§³Öasp.netÎı¾¿ò¿Ø¼þµÄ×Ô¶¯Íê³ÉÐÐΪ£¬¶øDragOverlayExtender¿Ø¼þÖ§³ÖÍ϶¯ÐÐΪ¡£
¡¡¡¡¡¤ ¿ª·¢Õß»¹¿ÉÒÔʹÓÃÒ»¸öÓëAtlas¿Ø¼þ¹¤¾ßÏäһͬÌṩµÄVisual studio 2005¹¤³ÌÄ£°å´´½¨¶¨ÖƵÄasp.net Atlas¿Ø¼þÀ©Õ¹Æ÷¡£
¡¡¡¡(¶þ) ¿Í»§¶Ë¿â
¡¡¡¡¿Í»§¶Ë¿â°üÀ¨Ò»×é(.js)JavaScriptÎļþ£¬ËüÃDZ»´ò°üΪMicrosoft.Web.Atlas.dll×°Å伯ÖеÄ×ÊÔ´¡£
°üº¬ÔÚÕâ¸öÀà¿âÖеĶÔÏóÌṩÁËÏÂÁÐÌØÕ÷£º
¡¡¡¡¡¤ JavaScriptÓïÑÔÀ©Õ¹£ºÔÊÐí¿ª·¢ÕßÒÔJavaScript±à³Ì£¬¶øÍ¬Ê±»¹ÄÜʹÓÃʹÓÃOO½á¹¹£¬ÀýÈçÃüÃû¿Õ¼ä¡¢Àࡢö¾Ù¡¢½Ó¿ÚºÍÊý¾ÝÀàÐÍ¡£
¡¡¡¡¡¤ JavaScript»ù¿âÀ©Õ¹£ºÕâ°üÀ¨ÓÃÓÚµ÷ÊÔ£¬¸ú×ÙºÍ×Ö·û´®²Ù×÷µÄÆäËü¶ÔÏó¡£
¡¡¡¡¡¤ ä¯ÀÀÆ÷¼æÈÝÐÔ£º¶ÔÓÚ¶¨Öƽű¾ºÍÓÉAtlas¿Ø¼þÉú³ÉµÄ½Å±¾µÄ×Ô¶¯ä¯ÀÀÆ÷¿ÉÒÆÖ²ÐÔ¡£
¡¡¡¡¡¤ ÍøÂ繦ÄÜ£ºÓÉλÓÚSys.NetÃüÃû¿Õ¼äÄÚ²¿µÄ¶ÔÏóÌṩ¡£ÕâЩ¹¦ÄÜʹµÃÓëÖ÷»úµÄÒ첽ͨѶºÍÖ´ÐÐÔ¶³Ì·½·¨µÄ±à³ÌÏ൱ÈÝÒס£
¡¡¡¡¡¤ HTML¿Ø¼þ°ü×°Æ÷£ºËüÃÇÔÊÐí¿ª·¢ÕßʹÓÃxml½Å±¾Ìí¼ÓÌØÕ÷¡ªÀýÈçÊý¾Ý°ó¶¨£¬ÐÐΪÒÔ¼°µ½Ðí¶àHTML¿Ø¼þºÍÔªËØµÄ¶¯×÷¡£
¡¡¡¡¡¤ Atlas¿Í»§¶Ë¿Ø¼þ£ºÖ§³Ö¿ª·¢ÕßʹÓÃJavaScript»òXML½Å±¾´´½¨·á¸»µÄÓ¦ÓóÌÐò£»ÕâЩ°üÀ¨ÔÚSys.UI.DataÃüÃû¿Õ¼äÄÚ²¿µÄ¿Ø¼þ£¬ÀýÈçListView£¬DataNavigator£¬ItemView£¬XSLTView£¬µÈµÈ¡£
¡¡¡¡¡¤ Xml-Script£ºÒ»¸öÉùÃ÷ÐԽű¾Ä£ÐÍ£¬ËüÔÊÐí¿ª·¢ÕßʹÓÃÒ»ÖÖÀàËÆÓÚasp.netµÄ±à³ÌÄ£ÐÍÊéд¿Í»§¶Ë´úÂë¡£AtlasÉùÃ÷ÐԽű¾±»Ê¹ÓÃÏÂÁÐÓï·¨¶¨ÒåÔÚ£¼script£¾£¼/script£¾±êÇ©ÄÚ²¿£º
£¼script type="text/xml-script"£¾ £¼page xmlns:script="http://schemas.microsoft.com/xml-script/2005"£¾ £¼references£¾ £¼/references£¾ £¼components£¾ £¼/components£¾ £¼/page£¾ £¼/script£¾ |
¡¡¡¡Õû¸ö¿Í»§¶Ë¿â¶¼°üº¬ÔÚAtlas.jsÎļþÖУ¬²¢ÇÒµ±ÔÚÒ»¸öÒ³ÃæÖж¨ÒåÒ»¸öScriptManager¿Ø¼þʱ±»Ä¬Èϵزο¼¡£ÁíÍâµØ£¬ÎªÁ˼õÉÙÔÚ¿Í»§¶ËÉú³ÉµÄ½Å±¾µÄÊýÁ¿£¬ÎÒÃÇ¿ÉÒÔ°ÑScriptManager¿Ø¼þµÄEnableScriptComponentsÉèÖÃΪfalse²¢ÇÒʹÓðüº¬ÔÚAtlasRuntime.jsÎļþÖеĸÿâµÄÒ»¸ö¼ò»¯°æ±¾¡£ÁíÍ⣬רÃŵĿâÎļþ£¬ÀýÈçAtlasDragandDrop.js£¬AtlasUIMap.js£¬AtlasUIGlitz.jsµÈµÈ£¬¶¼¿ÉÒÔ°´ÃûʹÓÃScriptManager¿Ø¼þµÄ½Å±¾¼¯ºÏÊôÐÔ½øÐÐÒýÓá£