ASP.Net 2.0 ·¢ËÍÓʼþµÄ´úÂë
ÕâÁ½ÌìÒòΪҪ×öÒ»¸ö¿ÉÒÔÊÕ¼¯Óû§Ìá½»ÐÅÏ¢£¬È»ºó·¢ËÍÓʼþµ½Ö¸¶¨ÓÊÏäµÄÍøÒ³¡£ÔÚ asp.net 2.0 ÀïÃæ·¢ËÍÓʼþ¿ÉÒÔʹÓà System.Net.Mail ÏÂÃæµÄÀà¡£http://www.systemnetmail.com/faq/2.1.aspx Õâ¸öµØÖ·ÓÐ System.Net.Mail µÄ×÷ÕßдµÄ·Â·ðÊÇ MSDN ÀàËÆµÄ Faq£¬¿´´úÂëµÄʱºò¿ÉÒԲο¼ÒÔÏ¡£Ê²Ã´¶¼²»ËµÁË£¬ÏÂÃæÌù³öÀ´´úÂë°É£¬±Ï¾¹´úÂëÊÇ×îÖØÒªµÄ£º
1protected void btnSend_Click(object sender, EventArgs e)
2 {
3 MailMessage mailMessage = new MailMessage();
4 string strBody;
5
6 mailMessage.from = new MailAddress("XX@gmail.com");
7 mailMessage.To.Add("XXX@gmail.com");
8 mailMessage.Subject = "Ô¶ù";
9
10 strBody = "<h2>" + ddlMainTag.SelectedItem.Text + "</h2><br>";
11 strBody += "<h4>" + tbTag.Text + "</h4><br><hr><br>";
12 strBody += "·" + tbAdv.Text;
13
14 sendMail(mailMessage);
15 }
16
17 //SendMail
18 private void sendMail(MailMessage mail)
19 {
20 SmtpClient smtpClient = new SmtpClient();
21 smtpClient.EnableSsl = true;
2
Ïà¹ØÎĵµ£º
ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order" virt ......
¹«Ë¾ÔÓÐÒ»¸ö¾ÖÓòÍø£¬¾¹ý¶àÄêµÄÐÞÐÞ²¹²¹£¬ÒѾ´´½¨Á˲»ÉÙµÄÄÚÈÝ£¬°üÀ¨Ò»Ð©Êý¾Ý¿â²éѯ±¨±í¡¢¹¤×÷Á÷µÈÍøÕ¾£¬ÕâЩÍøÕ¾ÓÐһЩÊÇÓÃASP.NETÀ´¿ª·¢µÄ£¬²¢ÇÒÓÃÁ˺ܶàÄ꣬»ýÀÛÁ˺ܶàÒµÎñÊý¾Ý£»ÏÖÔÚ¹«Ë¾Ïë°Ñ¾ÖÓòÍøÓÃWSS3.0À´¼ÜÉ裬Õâ¾ÍÃæÁÙµ½Ò»¸öºÜ¼¬ÊÖµÄÎÊÌ⣬¾ÍÊÇÔõÑùÀ´´¦ÀíÕâЩ¾ÉµÄÍøÒ³¡£Èç¹ûÍƵ¹ÖØÀ´£¬ÄÇô¹¤×÷Á¿½«ÊǷdz£ÏÅÈ˵ģ ......
ASP.NET³£¼û°²È«ÎÊÌâ
Ò»¡¢SQLÓï¾ä©¶´
Ðí¶à³ÌÐòÔ±ÔÚÓÃsqlÓï¾ä½øÐÐÓû§ÃÜÂëÑé֤ʱÊÇͨ¹ýÒ»¸öÀàËÆÕâÑùµÄÓï¾äÀ´ÊµÏֵģº
Sql="Select * from Óû§±í where ÐÕÃû = '" + name + "' and ÃÜÂë = '" + password + "'"
ͨ¹ý·ÖÎö¿ÉÒÔ·¢ÏÖ£¬ÉÏÊöÓï¾ä´æÔÚ×ÅÖÂÃüµÄ©¶´¡£µ±ÎÒÃÇÔÚÓû§Ãû³ÆÖÐÊäÈëÏÂÃæµÄ×Ö·û´®Ê±£ºtes ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using  ......
public static Boolean WriteTextFile(string content, string filepath,string name)
{
FileStream fs;
StreamWriter sw;
if (!System.IO.Directory.Exists(filepath))
{
DirectoryInfo DirInfo = Directory.CreateDirectory(filepath); //´´½¨Ä¿Â¼
DirI ......