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

ASP.NET³£ÓÃÓï¾ä

1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
Response.Write(" <script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')
</script>");
Response.Write(" <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>");
2.//µ¯³ö¶Ô»°¿ò
Response.Write(" <script language='javascript'>alert('²úÆ·Ìí¼Ó³É¹¦£¡')
</script >");
3.//ɾ³ýÎļþ
string filename ="20059595157517.jpg";
pub.util.DeleteFile(HttpContext.Current.Server.MapPath("../file/")
+filename);
4.//°ó¶¨ÏÂÀ­Áбí¿òdatalist
System.Data.DataView dv=conn.Exec_ex("select -1 as code,'ÇëÑ¡Ôñ¾­ÓªÄ£Ê½'
as content from dealin union select code,content from dealin");
this.dealincode.DataSource=dv;
this.dealincode.DataTextField="content";
this.dealincode.DataValueField="code";
this.dealincode.DataBind();
this.dealincode.Items.FindByValue(dv[0]["dealincode"].ToString
()).Selected=true;
5.//ʱ¼äÈ¥ÃëÏÔʾ
<%# System.DateTime.Parse(DataBinder.Eval
(Container.DataItem,&quot;begtime&quot;).ToString()).ToShortDateString()%>
6.//±êÌâ´øÁ´½Ó
<%# &quot; <a class=\&quot;12c\&quot; target=\&quot;_blank\&quot;
href=\&quot;http://www.51aspx/CV/_&quot;+DataBinder.Eval
(Container.DataItem,&quot;procode&quot;)+&quot;.html\&quot;>&quot;+
DataBinder.Eval(Container.DataItem,&quot;proname&quot;)+&quot; </a>&quot;%>
7.//ÐÞ¸ÄתÏò
<%# &quot; <A href=\&quot;editpushpro.aspx?id=&quot;+DataBinder.Eval
(Container.DataItem,&quot;code&quot;)+&quot;\&quot;>&quot;+&quot;ÐÞ¸Ä
&quot;+&quot; </A>&quot;%>
8.//µ¯³öÈ·¶¨°´Å¥
<%# &quot; <A id=\&quot;btnDelete\&quot; onclick=\&quot;return confirm('ÄãÊÇ·ñ
È·¶¨É¾³ýÕâÌõ¼Ç¼Âð?');\&quot; href=\&quot;pushproduct.aspx?
dl=&quot;+DataBinder.Eval(Container.DataItem,&quot;code&quot;)
+&quot;\&quot;>&quot;+&a


Ïà¹ØÎĵµ£º

ASP.NET³ÌÐòÖг£ÓõÄÈýÊ®ÈýÖÖ´úÂë


1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º 
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryStrin ......

ASP.NET Ò³ÃæÊý¾ÝУÑéÀà ÀîÌìƽÀÏʦдµÄ£¬ºÜºÃµÄ


    using System.Text.RegularExpressions;
 
/// <summary>
    /// Ò³ÃæÊý¾ÝУÑéÀà
    /// ÀîÌìƽ
    /// 2004.8
    /// </summary>
    public class PageValidate
    { ......

¹ØÓÚasp.net¶¯Ì¬Îļþת¾²Ì¬µÄhtmlÎļþ£¡

Èç¹ûҪת»¯µÄÒ³ÃæÖ»ÓÐÒ»Á½¸ö£¬ÇÒÁ½ÕßÖ®¼äµÄûʲô¹ØÁª£¬¾Í¿ÉÒÔÓÃÌæ»»·½·¨ÊµÏÖ£¬ÏÈÓÃhtml±àдºÃÒ»ÕÅÍøÒ³£¬ÔÚÐèÒªÓõ½Êý¾Ý¿âµÄµØ·½ÓÃÌØÊâµÄ±êÇ©±ê¼Ç×Å£¬ÀýÈç&idµÈ¡£ÔÚÓÃ.net±àдһÕÅaspxÍøÒ³ÓÃÓÚ°ÑÕâЩ±êÇ©Ìæ»»³ÉÏëÒªµÄÊý¾Ý¿âÄÚÈÝ£¬ÕâÑù¾ÍÐÐÁË¡£²»¹ý±È½ÏÂé·³µÄÊÇÿ´Î¸üÐÂÊý¾Ý¿â¶¼Òª×ª»¯Ò»´Î¡£
»¹ÓоÍÊÇÈç¹ûÊÇÍøÒ³Ö®¼äÓк ......

asp.net×¢²áÓû§Í¨¹ýemailÓÊÏäÑéÖ¤µÄʵÏÖ·½Ê½

 public void SendSMTPEMail(string strSmtpServer, string strfrom, string strfromPass, string strto, string strSubject, string strBody)
{
System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCre ......

asp.net³£ÓÃ֪ʶ

1. oncontextmenu="window.event.returnvalue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="return f ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ