Asp.net"Ò³Ãæ¼ÓÔØÖÐ"Ч¹ûʵÏÖ(ת)
ÔÚÍøÉÏÕÒÁ˺ö࣬ʵÏÖ·½Ê½´ó¶àÊÇʹÓö¨Ê±Æ÷
¸öÈ˾õµÃ¶¨Ê±Æ÷»áÔì³ÉÒ»¶¨³Ì¶ÈÉϵļÙÏó
£¨È磺¶¨Ê±Æ÷»¹Ã»½áÊøÒ³ÃæÒѾ¼ÓÔØÍê±Ï£¬»ò¶¨Ê±Æ÷½áÊøºóÒ³Ãæ»¹Ã»¼ÓÔØÍê³É£©
±¾·½·¨ÀûÓõÄÊÇjavascript£¬ÏÈÍøÒ³ÃæÀïÃæÐ´ÈëÒ»¸ö²ã£¬ÏÔʾ¼ÓÔØ¿ò£¬È»ºóµÈÒ³Ãæ½áÊøºó
ÔÚbodyµÄonloadÖÐдÈëʼþ£¬Òþ²Ø¸Ã¶Ô»°¿ò
·½·¨£¨ÎÒµÄϵͳÊǶà¸öÒ³Ãæ£¬ËùÒÔдÁËÒ»¸ö¹«ÓõÄÀàcommon.cs£©£º
ÔÚÀàÀïÃæ¼ÓÈëÈçϺ¯Êý£¨Ò²¿ÉÔÚÿ¸ö´úÂëºóÎļþÖÐдÈ룩£º
#region "Ò³Ãæ¼ÓÔØÖÐЧ¹û"
/// <summary>
/// Ò³Ãæ¼ÓÔØÖÐЧ¹û
/// </summary>
public static void initJavascript()
{
HttpContext.Current.Response.Write(" <mce:script language=JavaScript type=text/javascript><!--
");
HttpContext.Current.Response.Write("var t_id = setInterval(animate,20);");
HttpContext.Current.Response.Write("var pos=0;var dir=2;var len=0;");
HttpContext.Current.Response.Write("function animate(){");
HttpContext.Current.Response.Write("var elem = document.getElementById('progress');");
HttpContext.Current.Response.Write("if(elem != null) {");
HttpContext.Current.Response.Write("if (pos==0) len += dir;");
HttpContext.Current.Response.Write("if (len>32 || pos>79) pos += dir;");
HttpContext.Current.Response.Write("if (pos>79) len -= dir;");
HttpContext.Current.Response.Write(" if (pos>79 && len==0) pos=0;");
HttpContext.Current.Response.Write("elem.style.left = pos;");
HttpContext.Current.Response.Write("elem.style.width = len;");
HttpContext.Current.Response.Write("}}");
HttpContext.Current.Response.Write("function remove_loading() {");
HttpContext.Current.Response.Write(" this.clearInterval(t_id);");
HttpContext.Current.Response.Write("var targelem = document.getElementById('loader_container');");
HttpContext.Current.Response.Write("targelem.style.display='none';");
HttpContext.Current.Response.Write("targelem.style.visibility='hidden';");
HttpContext.Current.Response.Write("}");
HttpContext.Current.Response.Write("
// --></mce:script>");
HttpContext.Current.Response.Write("<mce:style><!--
"
Ïà¹ØÎĵµ£º
ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ & ......
ASP.net¿Ø¼þ·ÖÀࣺ
1¡¢HTML¿Ø¼þ System.Web.UI.Htmlcontrols
ÆÕͨHTML½Å±¾¿Ø¼þ£¬ÊôÓÚ¿Í»§¶Ë¿Ø¼þ£¬ÓÃÓÚ¿Í»§¶Ë½âÊÍÒ³ÃæµÄÏÔʾµÄÄÚÈÝ
Ò²¿ÉÒÔת»¯³É·þÎñÆ÷¿Ø¼þ£¬Ö»ÐèÒª¼ÓÉÏÊôÐÔ runat="server"
È磺Îı¾¿òÅäºÏ°´Å¥Ê¹ÓÃ
ÐÕÃû: <input id="txtUserName" name="txtUserName" type="text" /&g ......
ʹÓà SqlDataSource ¿Ø¼þÖ»ÐèºÜÉٵĴúÂë»òÎÞÐèÈκδúÂë¼´¿É´ÓÊý¾Ý¿âÖмìË÷Êý¾Ý¡£SqlDataSource ¿Ø¼þ¿ÉÓÃÓÚÈκξßÓйØÁª ADO.NET Ìṩ³ÌÐò£¨ÔÚÅäÖÃÎļþµÄ DbProviderFactories ½ÚÖÐÅäÖ㩵ÄÊý¾Ý¿â£¬°üÀ¨ Microsoft SQL Server¡¢Oracle¡¢ODBC »ò OLE DB Êý¾Ý¿â£¨Èç Microsoft Access£©¡£ÄúÔÚÅäÖÃʱָ¶¨ SqlDataSource ʹÓõ ......
////½ñÌìÔÚÐ޸ijÌÐòµÄʱºò·¢ÏÖÒ»¸öСµÄÎÊÌâÌØ¼Ç¼ÈçÏÂ:
//////ÓÐʱºòdatetimeÎÞ·¨×ª³Éstring£¬¿ÉÒÔÓÃgetdate()Ö±½Ó²åÈë¾Í¿ÉÒÔÁË
string str = "update adaddress set shenhe=" + ck + " ,shentime=getDate() where id=" + uid + "";
/////////////////////////////////////////
ÒÔϾßÌå½éÉÜÈÕÆÚÔõÑùת»»
DateTime.Now ......
¿ÉÒÔʹÓà SqlDataSource ¿Ø¼þÐÞ¸ÄÊý¾Ý¿âÖеÄÊý¾Ý¡£Ê¹Óøüз½°¸ÖÐµÄ SqlDataSource ¿Ø¼þµÄ×î³£Ó÷½·¨ÊǼìË÷Êý¾Ý²¢Ê¹ÓÃÊý¾Ý°ó¶¨ Web ·þÎñÆ÷¿Ø¼þ£¨Èç GridView¡¢DetailsView »ò FormView ¿Ø¼þ£©ÏÔʾÊý¾Ý¡£¿ÉÒÔÅäÖÃÊý¾Ý°ó¶¨¿Ø¼þºÍ SqlDataSource ÒÔ¸üÐÂÊý¾Ý¡£´ó¶àÊýÊý¾Ý°ó¶¨¿Ø¼þ¶¼ÔÊÐíÄú½«Æä ......