Asp.Net XML²Ù×÷»ùÀà(ÐÞ¸Ä,ɾ³ý,ÐÂÔö,´´½¨)
Asp.Net XML²Ù×÷»ùÀà(ÐÞ¸Ä,ɾ³ý,ÐÂÔö,´´½¨)
2009-12-21 16:59
/**********************************************************************************
*
* ¹¦ÄÜ˵Ã÷:XML´¦Àí»ùÀà
* ×÷Õß: Áõ¹¦Ñ«;
* °æ±¾:V0.1(C#2.0);ʱ¼ä:2006-12-13
*
* *******************************************************************************/
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 System.IO;
using System.Xml;
using System.Text;
using MSXML2;
namespace EC
{
/// <summary>
/// XML ²Ù×÷»ùÀà
/// </summary>
public class XmlObject : IDisposable
{
//ÒÔÏÂΪµ¥Ò»¹¦Äܵľ²Ì¬Àà
#region ¶ÁÈ¡XMLµ½DataSet
/**************************************************
* º¯ÊýÃû³Æ:GetXml(string XmlPath)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡XMLµ½DataSet
* ²Î Êý:XmlPath:xmlÎĵµÂ·¾¶
* ʹÓÃʾÁÐ:
* using EC; //ÒýÓÃÃüÃû¿Õ¼ä
* string xmlPath = Server.MapPath("/EBDnsConfig/DnsConfig.xml"); //»ñÈ¡xml·¾¶
* DataSet ds = EC.XmlObject.GetXml(xmlPath); //¶ÁÈ¡xmlµ½DataSetÖÐ
************************************************/
/// <summary>
/// ¹¦ÄÜ:¶ÁÈ¡XMLµ½DataSetÖÐ
/// </summary>
/// <param name="XmlPath">xml·¾¶</param>
/// <returns>DataSet</returns>
public static DataSet GetXml(string XmlPath)
{
DataSet ds = new DataSet();
ds.ReadXml(@XmlPath);
return ds;
}
#endregion
#region ¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã
/**************************************************
* º¯ÊýÃû³Æ:ReadXmlReturnNode(string XmlPath,string Node)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã:ÊÊÓÃÓÚÒ»¼¶½Úµã
* ²Î &
Ïà¹ØÎĵµ£º
web.xmlÎļþ¶ÔÓÚÅäÖÃÈκÎJava WebÓ¦Óö¼±ØÐèµÄ¡£
£¨1£©ÅäÖÃStrutsµÄActionServlet
<servlet><!--ÔªËØÀ´ÉùÃ÷ActionServlet-->
<servlet-name><!--ÔªËØ£ºÓÃÀ´¶¨ÒåServletµÄÃû³Æ-->
<servlet-class><!--ÔªËØ:ÓÃÀ´Ö¸¶¨ServletµÄÍêÕûÀàÃû-->
<servlet>
<servlet-name& ......
select top 6 * from ViewHouseSale where 1=1 and (EstateType='0' or EstateType='1')
and DateDiff(day,PubDate,getdate()) <=7 and IfBenefit='Y' and IfValid='Y' order by PubDate DESC
select top 6 * from ViewHouseSale where 1=1 and&nb ......
-----MD5¼ÓÃÜ
//ʹÓüÓÃÜ·þÎñÌṩ³ÌÐò(CSP) ÌṩµÄʵÏÖ£¬¼ÆËãÊäÈëÊý¾ÝµÄMD5 ¹þÏ£Öµ
MD5CryptoServiceProvider crypto = new MD5CryptoServiceProvider();
//½«×Ö·û´®× ......
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 ......
ÔÚasp.netÒ³ÔËÐУ¬´ËÒ³½«¾ÀúÒ»¸öÉúÃüÖÜÆÚ£¬ÔÚÉúÃüÖÜÆÚÖн«Ö´ÐÐһϵÁд¦Àí²½Ö裬ÕâЩ²½Öè°üÀ¨£º³õʼ»¯£¬ÊµÀý»¯¿Ø¼þ£¬»¹ÔºÍά»¤×´Ì¬£¬ÔËÐÐʼþ´¦Àí³ÌÐò´úÂëÒÔ¼°½øÐгÊÏÖ£»
Ò»°ãÀ´ËµÒ³Òª¾ÀúÒÔϵĸ÷¸ö½×¶Î£º
£¨1£©£ºÒ³ÇëÇó£ºÒ³ÇëÇó·¢ÉúÔÚÒ³ÉúÃüÖÜÆÚ¿ªÊ¼Ö®Ç°£¬Óû§ÇëÇóҳʱ£¬asp.net½«È·¶¨ÊÇ·ñÐèÒª·ÖÎöºÍ±àÒëÒ³£¨´Ó¶ø¿ªÊ¼Ò ......