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Ãû³Æ));
}
Ïà¹ØÎĵµ£º
Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇÇ°Á½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úÇ°Á½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......
1. ËäÈ»ÊÇ.net£¬µ«ÊÇÒѾ¼¸ºõÍêÈ«·ÅÆúÁË·þÎñÆ÷¿Ø¼þ£¬È¡¶ø´úÖ®µÄÊÇhtml¿Ø¼þ£¬¸³ÖµÊ±ºò¿ÉÒÔͨ¹ý×¢²ájavascript½Å±¾À´Íê³É¡£Ö»ÊÇѧϰ;ÖеÄÒ»¸öʵ¼ù£¬²»ÖªµÀÕâÑù»á²»»á¼õÉÙ±àÒ룬Ôö¼ÓÔËÐÐЧÂÊ¡£
2. ÍƼö¸úJQuery½áºÏ£¬NND£¬ÕâѾÕæµÄºÜÇ¿´ó...Èç¹ûÄã¸úÎÒÒ»ÑùÊÇjsС°×£¬ÓÖÏëNBÒ»°ÑŪ¸öAJAXʲôµÄ£¬ÓÃJQuery°Ñ¡£¡£¡£Õ⺢×Ó°üÄãÂú ......
• ²»ÒªÊ¹Óò»±ØÒªµÄSession£¬ºÍASPÖÐÒ»Ñù£¬ÔÚ²»±ØÒªµÄʱºò²»ÒªÊ¹ÓÃSession
• ²»Ê¹Óò»±ØÒªµÄServer Control
• ²»Ê¹Óò»±ØÒªµÄViewState
• ²»ÒªÓÃExcepti ......
Ö»ÐèÔÚasp.netÒ³ÃæµÄPageÖ¸ÁîÖÐÉèÖÃMaintainScrollPositionOnPostback="true"¾Í¿ÉÒÔÇáËÉʵÏÖ¡£
MaintainScrollPositionOnPostbackÊôÐÔµÄĬÈÏֵΪfalse¡£
ÁíÍâasp.netµÄpage¶ÔÏó»¹ÓÐÒ»¸öSmartNavigatorÊôÐÔ£¬Õâ¸öÊôÐÔÎÒÒ²ÊÔ¹ý¡£¡£ºÃÏñ¶ÔÓÚcssÓÐÓ°Ïì¡£Ò³Ãæ²¼¾ÖÓеã±ä»¯¡£¡£²»ÊǺܺÃʹ ......
Asp.netµÄÉí·ÝÑéÖ¤ÓÐÓÐÈýÖÖ£¬·Ö±ðÊÇ"Windows | Forms | Passport"£¬ÆäÖÐÓÖÒÔFormsÑéÖ¤ÓõÄ×î¶à£¬Ò²×îÁé»î¡£
Forms ÑéÖ¤·½Ê½¶Ô»ùÓÚÓû§µÄÑéÖ¤ÊÚȨÌṩÁ˺ܺõÄÖ§³Ö£¬¿ÉÒÔͨ¹ýÒ»¸öµÇ¼ҳÃæÑéÖ¤Óû§µÄÉí·Ý£¬½«´ËÓû§µÄÉí·Ý·¢»Øµ½¿Í»§¶ËµÄCookie£¬Ö®ºó´ËÓû§ÔÙ·ÃÎÊÕâ¸öwebÓ¦ÓþͻáÁ¬Í¬Õâ¸öÉí·ÝCookieÒ»Æð·¢Ë͵½·þÎñ¶Ë¡£·þÎñ¶ËÉ ......