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

»ñÈ¡ÓÉASP.NETÉú³ÉµÄ·þÎñÆ÷¿Ø¼þ±êʶ·û

 1
        private void Focus(string sDomID)
        {
            RegScript("focus", "document.getElementById(\"" + sDomID + "\").focus();");
        }
2
        public void Select(TextBox txtBox)
        {
            string sScript = "var dom=document.getElementById(\"" + txtBox.ClientID + "\");if(dom){dom.select();}\n";
            RegScript("Select", sScript);
        }
×¢£º
£¨1£© µ±Ê¹ÓÃĸ°å£¨.MASTER£©ºÍÓû§¿Ø¼þ£¨.ASCX£©µÄʱºò,Óû§¿Ø¼þµÄÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID,ĸ°æÒ³µÄ×ÓÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID
£¨2£©\" µÄÒâ˼ÊÇ£ºÒòΪдÔÚºǫ́µÄ.jsÎļþÖУ¬C#°Ñ " ÈÏʶ³É±êÖ¾ÆäΪ×Ö·û´®µÄÒ»ÖÖ·½Ê½£¬µ«Êǵ½JavaScriptǰ̨µÄʱºò½«Õâ¸ö " ¸ø¶ªµôÁË£¬¼ÓÒ»¸ö \ תÒå×Ö·û£¬¸æËßC#±à¼­Æ÷£¬Õâ¸ö¾ÍÊǵ¥µ¥µÄ " £¬ÕâÑùµ½JavaScriptǰ̨ÖУ¬¾Í»á±»·­Òë³É " £¬²»»á¶ªÊ§ÁË¡£
3
»ñÈ¡ÓÉ ASP.NET Éú³ÉµÄ·þÎñÆ÷¿Ø¼þ±êʶ·û¡£
ÎÊÌâÒ»£º Óû§¿Ø¼þµÄÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID£¬³öÏÖ²»Ò»Ö¡£
ÎÊÌâ¶þ£ºÄ¸°æÒ³µÄ×ÓÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID£¬³öÏÖ²»Ò»Ö¡£
½â¾ö°ì·¨£º
      document.getElementById("<%=TextBox1.ClientID%>").value="1234567";
´Ë´úÂë¿ÉÒÔÔÚ¿Í»§¶ËÍê³É¶Ô·þÎñÆ÷¶Ë¿Ø¼þµÄ·ÃÎÊ£¬ÓÉÓÚASP.NET»áΪ°Ñ·þÎñÆ÷¶Ë¿Ø¼þÔÚ¿Í»§¶ËµÄ³ÊÏÖÉú³É²»Í¬µÄÃû³Æ£¬ËùÒԴ˹¦ÄܱȽÏÓÐÓûñÈ¡¡£
×¢Òâ²ÉÓô˽â¾ö°ì·¨µÄÇ°Ìá: Asp.netµÄ¿Ø¼þΪ¾²Ì¬¿Ø¼þ£¨Í¨¹ý¹¤¾ßÌí¼ÓµÄ¿Ø¼þ£©
ÎÊÌâÈý£º ¶¯Ì¬´´½¨¿Ø¼þµÄClientIDµÄ»ñµÃ´æÔÚ£º²»ÄÜÔÚÒ³ÃæÖвÉÓÃ"<%=TextBox1.ClientID%>".·½·¨»ñµÃ£¨²»Äܵķ½·¨£¬ÒòΪ¿Ø¼þÊǶ¯Ì¬´´½¨µÄ£©£»Ò²²»ÄÜÔÚÒ³Ãæ½Å±¾ÖвÉÓÃTextBox1.ClientIDµÄ·½·¨»ñµÃ£¨»ñµÃµÄIDÊDz»ÕýÈ·µÄ£©¡£
½â¾ö°ì·¨£º
£¨CitySpecProductScheduledControl.ascx.cs´úÂëƬ¶Î £©
       &nb


Ïà¹ØÎĵµ£º

asp.net°²È«ÎÊÌâ

 ÎåÖÖ³£¼ûµÄASP.NET°²È«È±ÏÝ
±£Ö¤Ó¦ÓóÌÐòµÄ°²È«Ó¦µ±´Ó±àдµÚÒ»ÐдúÂëµÄʱºò¿ªÊ¼×öÆð£¬Ô­ÒòºÜ¼òµ¥£¬Ëæ×ÅÓ¦ÓùæÄ£µÄ·¢Õ¹£¬ÐÞ²¹°²È«Â©¶´ËùÐèµÄ´ú¼ÛÒ²ËæÖ®¿ìËÙÔö³¤¡£¸ù¾ÝIBMµÄϵͳ¿ÆѧЭ»á£¨Systems Sciences Institute£©µÄÑо¿£¬Èç¹ûµÈµ½Èí¼þ²¿ÊðÖ®ºóÔÙÀ´ÐÞ²¹È±ÏÝ£¬Æä´ú¼ÛÏ൱ÓÚ¿ª·¢ÆÚ¼ä¼ì²âºÍÏû³ýȱÏݵÄ15±¶¡£
¡¡¡¡Î ......

Èà ASP.Net MVC µÄURL¿´ÉÏÈ¥Ïñ¸ö´«Í³WebFormµÄURL

ÔÚIIS6Éϲ¿Êð¹ýASP.Net MVCµÄÒ»¶¨ÖªµÀ£¬ÎªÁËÄÜÈÃIIS½«¶ÔASP.Net MVCµÄÇëÇóת·¢¸øASP.Net´¦Àí£¬±ØÐëÌí¼ÓÓ¦ÓóÌÐòISAPIÓ³Éä¡£ ±ÜÃâÕâÖÖÓ³ÉäÌí¼ÓµÄÒ»ÖÖ·½·¨ÊÇÀûÓÃÒÑÓеÄÓ³É䣬ÀýÈç.aspxÀ©Õ¹ÃûµÄÓ³Éä¡£²»¹ýÄÇÑùµÄ»°ASP.Net MVCµÄUrl»áºÜ¡°ÄÑ¿´¡±£¬¡°http://localhost/ASPNETMVCAPP/Account.aspx/Logon/¡±¡£Èç¹ûÄÜ°ÑÆäÖеÄ.a ......

ASP.NETÖÐCookieµÄʹÓÃ

Éè¼ÆÒâͼ£º½«loginÒ³ÃæÖеĵǼÐÅÏ¢±£´æÔÚloginµÄCookieÖУ¬×ªµ½HomeÒ³Ãæʱ£¬ÀûÓõõ½µÄCookieÖµ¾ÍÄÜ×Ô¶¯µÇ¼ 
loginÒ³Ãæǰ̨¹ØÓÚCookieµÄ´úÂ룺
<td>
      &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID= ......

ASP.NetÒ³Ã澲̬»¯

 ²½Ö裺
£±.¡¡Ð½¨Ò»¸öWEB½â¾ö·½°¸Ãû³ÆΪHtmlStatic¡£
£².¡¡ÔÚÏîĿϽ¨Ò»¸öHtmlTemp.htmÆä´úÂëÈçÏ£º
¡¡¡¡¡¡<!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&g ......

ASP.NETÒ³ÃæÄ£ÐÍ

Ò»¡¢ASP.NETÒ³Ãæ
Ò»¸öASP.NETÒ³Ã棨»òÕß³ÆΪASP.NET´°Ì壩ÓÉÒÔϼ¸¸ö²¿·Ö×é³É£º
1¡¢Ö¸Áî
£¨°üÀ¨@Page¡¢@Import¡¢@OutputCache¡¢@Implements¡¢@Register¡¢@Master¡¢@Control…£©
2¡¢Head£¨HTMLÎĵµÍ·£©
3¡¢Body£¨HTMLÎĵµÌ壩
´°ÌåÔªËØ£¨form£©
¿Ø¼þ£¨html±ê¼Ç¡¢·þÎñÆ÷¿Ø¼þ±ê¼Ç£©
4¡¢´úÂ루¿Í»§¶Ë´úÂ룬·þÎñ¶Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ