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

ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂëʵÏÖ

 Button±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElement;
var objs = document.getElementsByTagName('INPUT');
for(var i=0; i< objs.length; i++)
{
if(objs[i].type.toLowerCase() == 'submit')
{
objs[i].disabled = true;
}
}
} //--> < /script>//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:asp.netpublic class PreventMultiClick : System.Web.UI.Page {
protected System.Web.UI.WebControls.Button Button1; protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.WebControls.LinkButton LinkButton1; protected System.Web.UI.WebControls.Button Button3; private void Page_Load(object sender, System.EventArgs e)
{
this.GetPostBackEventReference(this.Button3);
//±£Ö¤ __doPostBack(eventTarget, eventArgument) ÕýÈ·×¢²á if(!IsPostBack)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("if (typeof(Page_ClientValidate) == 'function')
{
if (Page_ClientValidate() == false)
{
return false;
}
}"); //±£Ö¤ÑéÖ¤º¯ÊýµÄÖ´ÐÐ sb.Append("if(window.confirm('are you sure?')==false) return false; ");
//×Ô¶¨Òå¿Í»§¶Ë½Å±¾ sb.Append("disableOtherSubmit(); ");
// disableËùÓÐsubmit°´Å¥ sb.Append(this.GetPostBackEventReference(this.Button3));
//ÓÃ__doPostBackÀ´Ìá½»£¬±£Ö¤°´Å¥µÄ·þÎñÆ÷¶ËclickʼþÖ´ÐÐ sb.Append("; ");
Button3.Attributes.Add("onclick",sb.ToString());
}
} #region Web Form Designer generated code override protected void OnInit(EventArgs e)
{
// // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent();
base.OnInit(e);
}
/// < summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// < /summary> private void InitializeComponent()
{
this.Button3.Click += new System.EventHandler(t


Ïà¹ØÎĵµ£º

ASP.NET

ʾÀý
µÚÒ»¸öʾÀýÑÝʾÈçºÎ´´½¨ FileUpload ¿Ø¼þ£¬¸Ã¿Ø¼þ½«Îļþ±£´æµ½´úÂëÖÐÖ¸¶¨µÄ·¾¶¡£
<%@ Page Language="C#" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<script runat="server">
  ......

Asp.NetʵÏÖÔÚÏßÈËÊýͳ¼Æ

 
ÀûÓÃApplication¶ÔÏóºÍSession¶ÔÏó¿ÉÒÔͳ¼Æµ±Ç°ÔÚÏßÓû§ÊýÁ¿.
×¢Òâ:
(1)ÔڻỰ¿ªÊ¼ºÍ½áÊøʱ,Ò»¶¨Òª½øÐмÓËøºÍ½âËø²Ù×÷¡£ÓÉÓÚ¶à¸öÓû§¿ÉÒÔ¹²ÏíApplication¶ÔÏó£¬Òò´Ë¼ÓËøÊDZØÒªµÄ£¬ÕâÑù¿ÉÒÔ±£Ö¤ÔÚͬһʱ
¿ÌÖ»ÓÐÒ»¸ö¿Í»§¿ÉÒÔÐ޸ĺʹæÈ¡Application¶ÔÏóµÄÊôÐÔ¡£Èç¹û¼ÓËøºó£¬³Ù³Ù²»¸ø¿ªËø£¬»áµ¼ÖÂÓû§ÎÞ·¨·ÃÎÊApplic ......

ASP.NET

      HyperLink Web ·þÎñÆ÷¿Ø¼þ¿ÉÔÚÍøÒ³ÉÏ´´½¨Á´½Ó£¬Ê¹Óû§¿ÉÒÔÔÚÓ¦ÓóÌÐòÖеÄÒ³¼äÒƶ¯¡£
 
Ò»¡¢±³¾°
ʹÓà HyperLink ¿Ø¼þµÄÖ÷ÒªÓŵãÊÇ¿ÉÒÔÔÚ·þÎñÆ÷´úÂëÖÐÉèÖÃÁ´½ÓÊôÐÔ¡£ÀýÈ磬Äú¿ÉÒÔ¸ù¾ÝÒ³ÃæÖеÄÌõ¼þ¶¯Ì¬¸ü¸ÄÁ´½ÓÎı¾»òÄ¿±êÒ³¡£
°²È«ËµÃ÷£º Ó볬Á´½ÓÏà¹ØÁªµÄ URL ¿ÉÄܻᱻÓû§¶ñÒâ´Û¸ ......

ASP.NET


      Image Web ·þÎñÆ÷¿Ø¼þʹÄú¿ÉÒÔÔÚ ASP.NET ÍøÒ³ÉÏÏÔʾͼÏñ£¬²¢ÓÃ×Ô¼ºµÄ´úÂë¹ÜÀíÕâЩͼÏñ¡£
 
Ò»¡¢±³¾°
¿ÉÒÔÔÚÉè¼Æʱ»òÔËÐÐʱÒÔ±à³Ì·½Ê½Îª Image ¶ÔÏóÖ¸¶¨Í¼ÐÎÎļþ¡£»¹¿ÉÒÔ½«¿Ø¼þµÄ ImageUrl ÊôÐ԰󶨵½Ò»¸öÊý¾ÝÔ´£¬ÒÔ¸ù¾ÝÊý¾Ý¿âÐÅÏ¢ÏÔʾͼÐΡ£
Óë´ó¶àÊýÆäËû Web ·þÎñÆ÷¿Ø¼þ²»Í¬£ ......

ASP.NETµÄʵÓôúÂë

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º

´«ËͲÎÊý£º
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryStrin ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ