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

ÈçºÎÔÚASP.NETÖÐʹÓõ¯³ö¶Ô»°¿ò?

1.ASP.NETÖÐʹÓÃAJAXʱÈçºÎµ¯³ö¶Ô»°¿ò
¾ÙÀýÈçÏ£º
ScriptManager .RegisterStartupScript (UpdatePanel1, UpdatePanel1.GetType(), "", "alert('³É¹¦')", true)
ÏÂÃæÕâ¸ö¸´ÔÓЩ
ScriptManager .RegisterStartupScript (UpdatePanel1, UpdatePanel1.GetType(), "", "alert('Ìáʾ£º²úÆ·Ìí¼Ó³É¹¦£¡');if(confirm('ÊÇ·ñ¼ÌÐøÌí¼Ó£¿È¡Ïûתµ½²úÆ·¹ÜÀíÒ³')){alert('±¾Ò³Ãæ¼ÌÐøÌí¼Ó')}else{open('productManage.aspx','_self');}", true)
2.µã»÷Ò³ÃæÉϵİ´Å¥£¬µ¯³öÒ»¸ö¶Ô»°¿òÌáʾÊÇ“È·¶¨”»¹ÊÇ“È¡Ïû”²Ù×÷£¬ÔÚ°´Å¥ÖÐÌí¼ÓÊôÐÔÀ´Íê³É
¾ÙÀýÈçÏ£º
public System.Web.UI.WebControls.Button btnDelRow;
btnDelRow.Attributes.Add("onclick", "return confirm('È·¶¨ÒªÉ¾Âð?');");
3.¶ÔÓÚÒ³ÃæÍê³ÉÒ»¸ö²Ù×÷ºó£¬µ¯³öÒ»¸ö¶Ô»°¿òÌáʾÊÇ·ñ“²Ù×÷³É¹¦”
¾ÙÀýÈçÏ£º
Response.Write("<mce:script type="text/javascript"><!--
alert('ɾ³ý³É¹¦!')
// --></mce:script>");
Response.Write("<mce:script type="text/javascript"><!--
alert('·¢±íÖ÷Ìâ³É¹¦!');location='../JLYGT/ThemeManager.aspx';
// --></mce:script>")
4.ÔÊÐí ASP.NET ·þÎñÆ÷¿Ø¼þÔÚ Page Öз¢³ö¿Í»§¶Ë½Å±¾¿é
¾ÙÀýÈçÏ£º
if(!this.IsStartupScriptRegistered("hello"))
this.RegisterStartupScript("hello","<mce:script type="text/javascript"><!--
alert('ÄãºÃ!')
// --></mce:script>");


Ïà¹ØÎĵµ£º

ASP.NET×é¼þÉè¼ÆÖ®ÉúÃüÖÜÆÚÏê½â

ASP.NET×é¼þÉè¼ÆÖ®ÉúÃüÖÜÆÚÊÇʲôÄØ£¿ÈÃÎÒÃÇÀ´¿´¿´£º
µ±Ò»¸öASP.NETÒ³Ãæ±»ÇëÇóºó£¬Ò»¸öpageʵÀý±»Éú³É£¬¿ªÊ¼×Ô¼ºµÄÂß¼­£¬×îÖÕ·µ»ØHTMLÁ÷¸øÓû§¶Ë¡£¹¹³ÉÂß¼­´¦ÀíµÄÊÇpageÖдæÔڵķþÎñÆ÷¶Ë¿Ø¼þÒÔ¼°¿Ø¼þ¼äµÄ½»»¥£¬²¢ÇÒÔÚÒ³Ãæ½áÊøÇ°·þÎñÆ÷¿Ø¼þÃDZ»Ïú»Ù£¨ÊÓ.netµÄ»ØÊÕ²ßÂÔ¶ø¶¨£©¡£ÄÇôÕâЩ¿Ø¼þÔڶ̶̵ÄÒ³Ãæ´¦Àí¹ý³ÌÖо­ÀúÁË´´½¨ ......

Ò»Ì×»ùÓÚasp.netµÄ°²È«Ð£Ñé»úÖÆÓ¦ÓÃÄ£ÐÍ £¡

using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Syste ......

IISÖÐÀûÓÃIpµØַʵÏÖÔÚ¾ÖÓòÍøÖзÃÎÊAsp.netÍøÕ¾

     ×î½üÏë°Ñ×öµÄASP.NETÍøÕ¾ÅäÖõ½IIS£¬ÊµÏÖÔÚ¾ÖÓòÍøÖзÃÎÊ¡£ÔÚÍøÕ¾ÉÏÕÒÁËЩ×ÊÁÏ£¬×Ô¼ºÑо¿ÁËÏ£¬ÏÖ°ÑһЩ¾ßÌå²½Öè¼°ÎÊÌâ·ÖÏí³öÀ´£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
     Ò»¡¢ÅäÖÃIIS
     1¡¢"³ÌÐò"->"ÉèÖÃ"->"¿ØÖÆÃæ°å"->"¹ÜÀí¹¤¾ß"->Ñ¡Ôñ"Internet Ð ......

ASP.NET¿Ø¼þ¿ª·¢»ù´¡Ö®ÊµÏֿؼþ¼¯ºÏÊôÐÔ

¼¯ºÏÊôÐÔÏàÐÅ´ó¼Ò¶¼ºÜÊìϤҲºÜ³£ÓÃ,ÈçDropDownList,ListBoxµÈ¿Ø¼þ
﹤asp:DropDownList ID="DropDownList1" runat="server"﹥              ﹤asp:ListItem﹥²âÊÔ1﹤/asp:ListItem﹥    & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ