asp.net C# ·¢ËÍ Óʼþ ºÍ ¸½¼þ ´úÂë
˵µ½·¢ËÍÓʼþ·¢ËÍ£¬ÏÈÌáÒ»ÏÂSMTP(ºÇºÇ£¬¸ßÊÖ¾ÍÌø¹ýÕâÒ»¶Î°É£¡)¡£ SMTPµÄÈ«³ÆÊÇ“Simple Mail Transfer Protocol”£¬¼´¼òµ¥Óʼþ´«ÊäÐÒé¡£ËüÊÇÒ»×éÓÃÓÚ´ÓÔ´µØÖ·µ½Ä¿µÄµØÖ·´«ÊäÓʼþµÄ¹æ·¶£¬Í¨¹ýËüÀ´¿ØÖÆÓʼþµÄÖÐת·½Ê½¡£SMTP ÐÒéÊôÓÚ TCP/IP ÐÒé´Ø£¬Ëü°ïÖúÿ̨¼ÆËã»úÔÚ·¢ËÍ»òÖÐתÐżþʱÕÒµ½ÏÂÒ»¸öÄ¿µÄµØ¡£SMTP ·þÎñÆ÷¾ÍÊÇ×ñÑ SMTP ÐÒéµÄ·¢ËÍÓʼþ·þÎñÆ÷¡£
ÔÙ¼òµ¥½éÉÜÒ»ÏÂÃû³Æ¿Õ¼ä£¨NameSpace£©System.Web.MailÀà¿âÀïËùÌṩµÄÓʼþ·¢Ë͵ĶÔÏó¡¢ÊôÐԺͷ½·¨
(1)ËüÓÐÈý¸öÀࣺSmtpMail¡¢MailMessageºÍMailAttachment¡£ÕâÈý¸ö¶ÔÏó±¾ÎĵÄʾÀý³ÌÐò´úÂëÖж¼Ó¦Óõ½ÁË£¡
1. MailMessage ,ÌṩÊôÐԺͷ½·¨À´´´½¨Ò»¸öÓʼþÏûÏ¢¶ÔÏó¡£(Provides properties and methods for constructing an e-mail message.)
2. MailAttachments – ÌṩÊôÐԺͷ½·¨À´´´½¨Ò»¸öÓʼþ¸½¼þ¶ÔÏó¡£(Provides properties and methods for constructing an e-mail attachment.)
3. SmtpMail – ÌṩÊôÐԺͷ½·¨Í¨¹ýʹÓÃwindows 2000 CDOSYS µÄÏûÏ¢×é¼þµÄÁªºÏÊý¾Ý¶ÔÏóÀ´·¢ËÍÓʼþÏûÏ¢£©¡£(Provides properties and methods for sending messages using the Collaboration Data Objects for Windows 2000 (CDOSYS) message component)
(2)¸÷¸öÀàµÄÊôÐÔ¡£
1.Ïȼòµ¥½éÉÜSmtpMailµÄÊôÐÔ£º SmtpServer -- SMTPµÄµØÖ·¡£
2.Ö÷ÒªÀ´½éÉÜMailMessage¶ÔÏóµÄÊôÐÔ
from -- ·¢ËÍÓʼþµÄµØÖ·
To -- ½ÓÊÜÓʼþµÄµØÖ·
Subject -- ÓʼþµÄ±êÌâ
Priority -- ÓʼþµÄÓÅÏȼ¶£¨ÓÐЧֵΪHigh,Low,Normal£©
Attachments -- ·µ»ØÒ»¸ö¼¯ºÏ£¬´ú±í¸½¼þ
Bcc -- ÃÜË͵
Ïà¹ØÎĵµ£º
/*
±¾¶Î´úÂëÔÚ¹«Ë¾ÏîÄ¿ÖÐʵ¼ÊÔ¶³Ìµ÷ÓõÚÈý·½¹«Ë¾ÌṩµÄC#¿ª·¢WebServiceµÄʾÀý
*/
/**
* µÇ¼ÓÎÏ·
*
* @param paramPN
* @param paramTerraceID
* @param paramSvrID
*/
private String loginGame(String paramPN, HttpServletRequest req){
&n ......
Introduction
In this article, we will take a closer look at how ASP.NET pages post back to themselves, and how to customize this feature in our web applications.
function __doPostBack(eventTarget, eventArgument)
One of the most important features of the ASP.NET environment is the ability to decla ......
using System;
using System.IO;
using System.Web;
namespace SEC
{
/**////
/// ¶ÔÎļþºÍÎļþ¼ÐµÄ²Ù×÷Àà
///
public class FileControl
{
public FileControl()
{
}
/**////
/// ÔÚ¸ùĿ¼Ï´´½¨Îļþ¼Ð
///
///
Òª´´½¨µÄÎļþ·¾¶
public void CreateFolder(string FolderPathName)
{ ......
a.aspx
//ÏÔʾij¸ö¶©µ¥µÄÏêϸÐÅÏ¢£¬Í¨¹ýÒ»¸öģ̬¶Ô»°¿ò£¬¶øÇÒÆÁÄ»»á±äÑÕÉ«
function ShowOrderDetails(orderId) {
var url = "AddMenu.aspx?ID=" + orderId;
&n ......
ÔÚASP.NETÍøÕ¾¿ª·¢ÖпÉÄÜ»áÓöµ½Òª¸ü»»Êý¾Ý¿â£¬È罫Aceess»»ÎªSQL Server £¬ÓÉÓÚAceessÒýÓÃSystem.Data.OleDbÃüÃû¿Õ¼ä£¬SQL ServerÒýÓÃSystem.Data.SqlClientÃüÃû¿Õ¼ä¡£ÔÚÒ»°ã³ÌÐò´úÂëÖÐÎÒÃÇÐèÒª¸ü¸ÄÁ¬½Ó×Ö·û´®£¬ADO.NETÊý¾Ý·ÃÎÊÃüÁî¶ÔÏó£¬×îÂé·³µÄÊDz»Í¬Êý¾Ý¿âÓи÷×Ô²»Í¬SqlÃüÁî¡£ÎÒÃÇ¿ÉÒÔʹÓóéÏ󹤳§Ä£Ê½ÊµÏÖASP.NET·ÃÎʲ ......