ÓÃasp.netʵÏֵİѱ¾ÎÄÍƼö¸øºÃÓѹ¦ÄÜ
///<summary>
///<author>·ÉÓ¥@ASPCool.com</author>
///<description>±¾ÎÄÓÃasp.netʵÏÖ°Ñ´ËÎÄÍƼö¸øºÃÓѵŦÄÜ¡£</desciption>
///<copyright>ASP¿á¼¼Êõ×ÊѶÍø(www.ASPCool.com)</copyright>
///</summary>
ÕâÀï·ÉÓ¥ÓÃÒ»¸ö¼òµ¥µÄÀý×ÓÏò´ó¼Ò½éÉÜÈçºÎʹÓÃasp.netµÄÓʼþ·¢Ë͹¦ÄÜ¡£Ê×ÏÈ£¬ÎÒÃÇÏÈ×öÒ»¸ö·¢ËͽçÃæ¡£tuijian.asp, ÆäÖÐtitleÊÇ´ú±íÎÄÕµıêÌ⣬id´ú±íÎÄÕµıàºÅ¡£
<html>
<body>
ÄúºÃ£¬»¶ÓʹÓÃASP¿á¼¼Êõ×ÊѶÍøÎÄÕÂÍƼö¹¦ÄÜ£¬ÄúÍƼöµÄÎÄÕÂΪ£º¡¶<%=request("title")%>¡·.<BR>
<form action="mail.aspx">
ÄúµÄÐÅÏ䣺<INPUT TYPE="text" NAME="sender"><BR>
ÊÕ¼þÈËÐÅÏ䣺<INPUT TYPE="text" NAME="accepter"><BR>
<INPUT TYPE="hidden" name="title" value="<%=request("title")%>">
<INPUT TYPE="hidden" name="id" value="<%=request("id")%>">
<INPUT TYPE="submit" value="·¢ËÍ"><INPUT TYPE="reset" value="ÖØд">
</form>
</body>
</html>
ÏÂÃæÎÒÃǾÍÓÃasp.netÀ´ÊµÏÖÍƼöÎÄÕ¹¦ÄÜ£¬mail.aspx
<% @Page Language="C#" Debug="true"%>
<% @Import Namespace="System.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
msgMail.To = Request["accepter"]; //Óʼþ½ÓÊÜÕß
msgMail.Cc = "webmaster@aspcool.com";
msgMail.from = Request["sender"];
msgMail.Subject = "ÄúµÄÅóÓÑ´ÓASPCOOL.COM¸øÄúÍƼöÁËһƪÎÄÕ¡£";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "<html><body><b>" + Request["accepter"] +"</b>,ÄúºÃ¡£<br>" +
"ÄúµÄÅóÓÑ: <font color=\"red\">"+ Request["sender"]+ "</font>´Ó<a href=http://www.21asp.net>21asp.net<
Ïà¹ØÎĵµ£º
ÔÎÄ£ºÁõÎä|ASP.NETÖÐÔÚµã»÷°´Å¥ºó½«¸Ã°´Å¥ÉèΪ²»¿ÉÓõÄÈô¸ÉÇé¿ö
ÏîÄ¿Öо³£³öÏÖÓû§Öظ´Ìá½»µÄÇé¿ö£¬ÎªÁË·ÀÖ¹ÕâÖÖÇé¿ö£¬×î³£Óõķ½·¨¾ÍÊÇÔÚÓû§µã»÷°´Å¥ºó½«¸Ã°´Å¥ÉèΪ²»¿ÉÓ㬱ÊÕßÔÚʵ¼Ê¿ª·¢µ±ÖÐÓöµ½Á˶àÖÖ²»Í¬µÄÇé¿ö£¬ÔÚ´Ë×ö¸öС½á£¬ÒÔ¹©²Î¿¼¡£
µÚÒ»ÖÖÇé¿öÊÇ·ÇsubmitÀàÐ͵İ´Å¥
ÕâÖÖÇé¿ö±È½Ï¼òµ¥£¬Ö»ÒªÔÚ¿Í»§¶ËÌí¼ÓÊ ......
Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
<form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
</form>
....
&nbs ......
1 response.redirect Õâ¸öÌøתҳÃæµÄ·½·¨ÌøתµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø£¨2´Îpostback£©£¬µ«Ëû¿ÉÒÔÌøתµ½ÈκÎÒ³Ã棬ûÓÐÕ¾µãÒ³ÃæÏÞÖÆ£¨¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË£©£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ£¡redirectÌøת»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸ö httpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌøתµ½ÐÂÒ³Ã棬Ȼºó¿Í»§¶ËÔÚ·¢ËÍÌøתÇëÇóµ½·þÎ ......