ASP.net ÉèÖÃĬÈÏ°´Å¥
public static void SetEnterControl(System.Web.UI.Control Ctrl)
{
Page mPage = Ctrl.Page;
string mScript;
mScript = @"<script language=""javascript"">
function document.onkeydown()
{
var e = event.srcElement;
var k = event.keyCode;
if (k == 13 && e.type != ""textarea"")
{
document.all." + Ctrl.ClientID + @".click();
event.cancelBubble = true;
event.returnValue = false;
}
}
</script>";
if (!mPage.IsClientScriptBlockRegistered("SetEnterControl"))
{
mPage.RegisterClientScriptBlock("SetEnterControl", mScript);
}
}
È»ºóÔÙpageLoad·½·¨Öе÷Óø÷½·¨£¬²¢´«µÝĬÈÏ°´Å¥µÄ¶ÔÏóÃû¡£
protected void Page_Load(object sender, EventArgs e)
{
SetEnterControl((Button)(°´Å¥IDÃû³Æ));
}
Ïà¹ØÎĵµ£º
using System.Text.RegularExpressions;
Regex reg = new Regex(@"^\d+$"); //ÑéÖ¤×Ö·û´®
Response.Write( reg.IsMatch(""));
Response.Write(reg.IsMatch("sf"));
Response.Write ......
Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇÇ°Á½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úÇ°Á½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......
¾³£ÐèÒªÔÚÊý¾Ý¿âÓëExeclÖ®¼ä»¥µ¼Êý¾Ý¡£netʱ´ú£¬ADO.NET¿ÉÒÔʹÓÃʹÓÃMicrosoft.Jet.OleDb·ÃÎÊ·ÃÎÊExcel£¬ÍøÉÏÒѾÓкܶàÀàËƵÄ×ÊÔ´£¬×îµäÐÍÒ²ÊÇ×î¼òµ¥µÄ¿ÉÄÜÈçÏ£º£¨asp.net»·¾³£©
// Á¬½Ó×Ö·û´®
......
·ÖÀà: ר¼ÒBlog ÍƼöÕߣºadmin| ä¯ÀÀÁ¿£º489 views| 1 ¸öÆÀÂÛ
Èç¹ûÎÒÃÇÓÃIISËÞÖ÷ASP.net£¬µ¥²½µ÷ÊÔʱ£¬»áÓпÉÄÜÏÂÃæµÄÒì³£±¨³öÀ´£º
—————————
Microsoft Visual Studio
—————————
The web serv ......
Asp.netµÄÉí·ÝÑéÖ¤ÓÐÓÐÈýÖÖ£¬·Ö±ðÊÇ"Windows | Forms | Passport"£¬ÆäÖÐÓÖÒÔFormsÑéÖ¤ÓõÄ×î¶à£¬Ò²×îÁé»î¡£
Forms ÑéÖ¤·½Ê½¶Ô»ùÓÚÓû§µÄÑéÖ¤ÊÚȨÌṩÁ˺ܺõÄÖ§³Ö£¬¿ÉÒÔͨ¹ýÒ»¸öµÇ¼ҳÃæÑéÖ¤Óû§µÄÉí·Ý£¬½«´ËÓû§µÄÉí·Ý·¢»Øµ½¿Í»§¶ËµÄCookie£¬Ö®ºó´ËÓû§ÔÙ·ÃÎÊÕâ¸öwebÓ¦ÓþͻáÁ¬Í¬Õâ¸öÉí·ÝCookieÒ»Æð·¢Ë͵½·þÎñ¶Ë¡£·þÎñ¶ËÉ ......