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

asp.net ÆÁ±Î Ö»ÄÜ ÊÇÊý×Ö

 //Êý×Ö×Ö·û
       public static string KeepNum(string str)
       {
           char[] tmp = new char[str.Length];
           char[] s = str.ToCharArray();
           for (int i = 0, j = 0; i < str.Length; i++)
           {
               if (s[i] >= '0' && s[i] <= '9')
               {
                   tmp[j] = s[i];
                   j++;
               }
           }
           return new string(tmp);
       }
<input type="text" id="mobile" runat="server" maxlength="12" onkeyup="value=value.replace(/[^\d]/g,'')" />


Ïà¹ØÎĵµ£º

asp.netÒ³ÃæˢкóµÄ¹ö¶¯ÌõλÖò»±ä

Ö»ÐèÔÚasp.netÒ³ÃæµÄPageÖ¸ÁîÖÐÉèÖÃMaintainScrollPositionOnPostback="true"¾Í¿ÉÒÔÇáËÉʵÏÖ¡£
MaintainScrollPositionOnPostbackÊôÐÔµÄĬÈÏֵΪfalse¡£
ÁíÍâasp.netµÄpage¶ÔÏó»¹ÓÐÒ»¸öSmartNavigatorÊôÐÔ£¬Õâ¸öÊôÐÔÎÒÒ²ÊÔ¹ý¡£¡£ºÃÏñ¶ÔÓÚcssÓÐÓ°Ïì¡£Ò³Ãæ²¼¾ÖÓеã±ä»¯¡£¡£²»ÊǺܺÃʹ ......

ASP.NET»ñÈ¡¿Í»§¶ËIP/Óû§ÃûµÈÐÅÏ¢

1. ÔÚASP.NETÖÐרÓÃÊôÐÔ£º
»ñÈ¡·þÎñÆ÷µçÄÔÃû£ºPage.Server.ManchineName
»ñÈ¡Óû§ÐÅÏ¢£ºPage.User
»ñÈ¡¿Í»§¶ËµçÄÔÃû£ºPage.Request.UserHostName
»ñÈ¡¿Í»§¶ËµçÄÔIP£ºPage.Request.UserHostAddress
2. ÔÚÍøÂç±à³ÌÖеÄͨÓ÷½·¨£º
»ñÈ¡µ±Ç°µçÄÔÃû£ºstatic System.Net.Dns.GetHostName()
¸ù¾ÝµçÄÔÃûÈ¡³öÈ«²¿IPµØÖ ......

asp.netÒ³ÃæÖ®¼ä´«ÖÐÎÄÊÇÂÒÂëµÄ´¦Àí·½·¨

½ñÌìÔÚ×öÒ»¸öÎÞË¢ÐÂÅжϹ«Ë¾Ãû³Æ£¬ÊÇ·ñÖظ´µÄʱºò£¬·¢ÏÖÒ»¸öÎÊÌâ¾ÍÊÇͨ¹ýjavascript´«µ½asp.netÒ³ÃæµÄÖµÊÇÂÒÂë¡£ÒÔǰûÓз¢ÏÖ¡£ÒòΪ ÒÔÇ°×ö²âÊÔʱ£¬¶¼ÊÇÓÃÓ¢ÎÄ×Ö·û½øÐеIJâÊÔ¡£½ñÌìÊäÈ뺺×ֺ󣬷¢ÏÖÓÐÕâÖÖÎÊÌâ¡£¸Ð¾õ¿ÉÄÜÊDZàÂëµÄÎÊÌâ¡£¾ÍÉÏÍø²éÁËһϡ£ÕÒµ½Ò»Ð©·½·¨£¬ÈçÏ£º
1.ÉèÖÃweb.configÎļþ
<system.web>
&l ......

Ïò ASP.NET Web ·þÎñÆ÷¿Ø¼þÌí¼Ó¿Í»§¶Ë½Å±¾Ê¼þ

¸üУº2007 Äê 11 Ô ¿ÉÒÔÏñ¶Ô HTML ÔªËØÄÇÑù£¬ÒÔÉùÃ÷·½Ê½Ïò ASP.NET ÍøÒ³ÉϵĿؼþÌí¼Ó¿Í»§¶Ë½Å±¾¡£»òÕߣ¬Èç¹ûʼþ»ò´úÂëÒÀÀµ½öÔÚÔËÐÐʱ¿ÉÓõÄÐÅÏ¢£¬¿ÉÒÔͨ¹ý±à³Ì·½Ê½Ïò ASP.NET Web ·þÎñÆ÷¿Ø¼þÌí¼Ó¿Í»§¶Ë½Å±¾Ê¼þ¡£ ˵Ã÷£º ¿ÉÒÔÔÚ¿Í»§¶Ë½Å±¾ÖÐͨ¹ý ID ÒýÓÿؼþ¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û ASP.NET ÍøÒ³ÖеĿͻ§¶Ë½Å±¾¡£ Ïò ......

ASP.NETÖÐ"ίÍÐ"£¨delegate£©µÄʹÓüòµ¥ÊµÀý

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
/// <summary>
/// ÉùÃ÷ίÍÐ
/// </summary>
/// <param name="name"></param>
public delegate void GreetPeopleDelegate(st ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ