Asp.net ×Ô¶¯·¢ËÍÓʼþµÄ·½·¨
Asp.net ×Ô¶¯·¢ËÍÓʼþµÄ·½·¨
½ñÌìÓÐÒ»¸öÄ£¿éÐèÒª×Ô¶¯·¢ËÍÓʼþµÄ¹¦ÄÜ£¬¾ÍËæ±ãдÁËÒ»¸ö£¬¼Ç¼һÏÂ×÷Ϊ»ýÀÛ¡£
Ò»¡¢Ê×ÏÈÐèÒªÅäÖÃweb.configÎļþ£º
<system.net>
<mailSettings>
<smtp from="Emailname">
<network host="smtp.163.com" userName="Emailname" password="Emailpassword"
port="25" defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>
¶þ¡¢È»ºó±àд·¢ËÍÓʼþµÄº¯Êý£º
//// <summary>
/// Óʼþ·¢ËÍ·½·¨(´ø¸½¼þ)
/// </summary>
/// <param name="mailto">ÊÕ¼þÈ˵ØÖ·¡£È磺receiver@163.com</param>
/// <param name="mailsubject">Óʼþ±êÌâ</param>
/// <param name="mailbody">ÓʼþÕýÎÄ</param>
/// <param name="mailfrom">Óʼþ·¢ËÍÈ˵ØÖ·¡£È磺sender@163.com</param>
/// <param name="list">¸½¼þ·¾¶</param>
/// <returns></returns>
public bool MySendMail(string mailto, string mailsubject, string mailbody, string mailfrom, ArrayList list)
{
try
{
//Óʼþ·¢ËÍÈ˵ØÖ·
System.Net.Mail.MailAddress from = new System.Net.Mail.MailAddress(mailfrom);
//Èçtest@163.com,³õ²½²âÊÔ£¬ÓÃtest@sina.com²»ÐУ¬ÓÃ163µÄÓʼþ·þÎñÆ÷£¬¾Í±ØÐëÓÃ163ÓÊÏäµÄÓû§Ãû
//ÊÕ¼þÈ˵ØÖ·
System.Net.Mail.MailAddress to = new System.Net.Mail.MailAddress(mailto);//Èçtest@tom.com
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(from, to);
mail.Subject = mailsubject;
mail.Body = mailbody;
//ÒÔÏÂÉèÖ÷þÎñÆ÷
System.Net.Mail.SmtpClient mySmth = new System.Net.Mail.SmtpClient();
//ÒÔÏÂΪÔö¼Ó¸½¼þ
int count = list.Count;
for (int i = 0; i < count; i++)
{
Ïà¹ØÎĵµ£º
×î½üÔÚsina¿´nbaµÄÎÄ×ÖÖ±²¥µÄʱºò£¬¶ÔÍøÕ¾ÓÒϽǵÄÄÇÒ»¸öÁÄÌì´°¿Ú²úÉúÐËȤ£¬¾Í¾ö¶¨×Ô¼ºÒ²×öÒ»¸ö¡£
ÉÏÍø²é²é×ÊÁÏ£¬ÕâÑùµÄÁÄÌìÊÒÎ޷ǾÍÊÇÓû§ÊäÈëÊý¾Ý´«µ½·þÎñÆ÷±£´æ£¬È»ºóÓû§Ò³ÃæÔÙʵʱµØ´ÓÊý¾Ý¿âÈ¡³öÊý¾Ý£¬ÏÔʾÔÚÒ³ÃæÉÏ£¬¼´¿ÉÍê³ÉÒ»´ÎÁÄÌì²Ù×÷¡£
Ê×ÏÈÎÒ¶¨ÒåÁËÒ»¸öxmlÎļþ£¬ÓÃÓÚ±£´æÓû§ ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......
×î½üÔÚasp.net Óõ½µÄsqlserver´æ´¢¹ý³Ì·ÖÒ³ÖÐÏÔʾÊý¾ÝʱÓöµ½¹ØÓÚÅÅÐòÎÊÌâ¡£
ÍøÉϵÄһЩ·ÖÒ³´æ´¢¹ý³ÌÖ»Ö§³ÖÅÅÐòÁÐΪint ÀàÐÍ£¬¶ÔÓÚʵ¼Ê¿ª·¢Öкܶàʱºò¶¼ÐèÒª¶ÔDateTimeÀàÐÍ£¬varcharÀàÐͽøÐÐÅÅÐò¡£
ÏÂÃæ·ÖÏíһϿÉÒÔÖ§³ÖÈÎÒâÊý¾ÝÀàÐ͵ÄÁнøÐÐÅÅÐòµÄ´æ´¢¹ý³Ì¡£
Create PROCEDURE sp_viewByPage
@TblName var ......
Ê×ÏÈÉêÃ÷ ´¿Êô¸öÈËÁ·Ï°Ö®×÷ ÇëÎðÓÃÓÚÉÌҵĿµÄ..........ÎÞÓï
¼ÍÄîÒ»ÏÂÎÒÒÔÇ°µÄÒ»¸ö×÷Æ·<¿ú>,ÒÔºó¾ÍÓÃËüµ±ÎÒµÄLOGOÁË
½ñÌìÊÇÊ×·¢,ÕâƪÎÄÕÂÎÒ»á³ÖÐø¸üÐÂ,ÎÒ²ÎÕÕÁËÔ°ÇøÀïÇ°±²µÄ¾Ñé,ÃþË÷×ÅȥʵÏÖ,Ä¿Ç°´óÌåµÄ»¹Î´ÍêÉÆ,ÏÈ·¢ÕÅͼÉÏÀ´...
......
ÔÚʹÓÃAJAX½øÐгÌÐò¿ª·¢µÄʱºò£¬Ò»Ö±¶¼»áÃæ¶ÔÒ»¸ö»º´æµÄÎÊÌ⣡£¡
¼´ÊÇ£¬ÉÏ´ÎÇëÇóµÄʱºò£¬ÒòΪÄãµÄSQLÓï¾ä»òÕßÆäËûÔÒò£¬webserviceÖзµ»ØֵΪ¿Õ£¬²»ÊÇÄãÏëÒªµÄ½á¹û¼¯£¬ÔÚÄã·¢ÏÖwebserviceÖÐÓï¾äÌå³ö´íºó£¬½øÐÐÐ޸ģ¬ÖØвâÊÔ£¬ÈÔÈ»ÊÇÉϴεķµ»Ø½á¹û£¡¸Ð¾õ¾ÍÏñÄãµÄÐÞ¸ÄÍêÈ«ÎÞЧ¡£¡£
Æäʵ£¬ÕâÊÇÔÚAJAXµ ......