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,"begtime").ToString()).ToShortDateString()%>
6.//±êÌâ´øÁ´½Ó
<%# " <a class=\"12c\" target=\"_blank\"
href=\"http://www.51aspx/CV/_"+DataBinder.Eval
(Container.DataItem,"procode")+".html\">"+
DataBinder.Eval(Container.DataItem,"proname")+" </a>"%>
7.//ÐÞ¸ÄתÏò
<%# " <A href=\"editpushpro.aspx?id="+DataBinder.Eval
(Container.DataItem,"code")+"\">"+"ÐÞ¸Ä
"+" </A>"%>
8.//µ¯³öÈ·¶¨°´Å¥
<%# " <A id=\"btnDelete\" onclick=\"return confirm('ÄãÊÇ·ñ
È·¶¨É¾³ýÕâÌõ¼Ç¼Âð?');\" href=\"pushproduct.aspx?
dl="+DataBinder.Eval(Container.DataItem,"code")
+"\">"+&a
Ïà¹ØÎĵµ£º
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryStrin ......
using System.Text.RegularExpressions;
/// <summary>
/// Ò³ÃæÊý¾ÝУÑéÀà
/// ÀîÌìƽ
/// 2004.8
/// </summary>
public class PageValidate
{ ......
Èç¹ûҪת»¯µÄÒ³ÃæÖ»ÓÐÒ»Á½¸ö£¬ÇÒÁ½ÕßÖ®¼äµÄûʲô¹ØÁª£¬¾Í¿ÉÒÔÓÃÌæ»»·½·¨ÊµÏÖ£¬ÏÈÓÃhtml±àдºÃÒ»ÕÅÍøÒ³£¬ÔÚÐèÒªÓõ½Êý¾Ý¿âµÄµØ·½ÓÃÌØÊâµÄ±êÇ©±ê¼Ç×Å£¬ÀýÈç&idµÈ¡£ÔÚÓÃ.net±àдһÕÅaspxÍøÒ³ÓÃÓÚ°ÑÕâЩ±êÇ©Ìæ»»³ÉÏëÒªµÄÊý¾Ý¿âÄÚÈÝ£¬ÕâÑù¾ÍÐÐÁË¡£²»¹ý±È½ÏÂé·³µÄÊÇÿ´Î¸üÐÂÊý¾Ý¿â¶¼Òª×ª»¯Ò»´Î¡£
»¹ÓоÍÊÇÈç¹ûÊÇÍøÒ³Ö®¼äÓк ......
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 ......
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 ......