Asp.net¶¯Ì¬×ª¾²Ì¬Ò³ÃæµÄÁ½ÖÖ·½·¨×ܽá
///Asp.net¶¯Ì¬×ª¾²Ì¬Ò³ÃæµÄÁ½ÖÖ·½·¨×ܽá
///ÓÉÓÚËÑË÷ÒýÇæ¶ÔaspxÒ³ÃæÊÕ¼ºÍhtmlÒ³ÃæµÄÊÕ¼ÂʵIJî±ðÒÔ¼°Ò³Ãæ×ÊÔ´Õ¼ÓÃÎÊÌ⣬ÎÒÃǺܶàʱºòÐèÒª
///ʵÏÖaspxÒ³Ã涯̬ת¾²Ì¬¡£Á½ÖÖÖ÷Á÷·½·¨ÈçÏ£º
///µÚÒ»ÕÅ·½·¨:
///ʹÓÃÄ£°åת»»£¬²½ÖèÈçÏ£º
///1£¬½¨Á¢Myconvert.cs ÀàÎļþ
using System;
//¼ÇµÃÌí¼ÓÒÔÏÂÈý¸öÒýÓÃ
using System.Text;
using System.Web;
using System.IO;
namespace TesConvert
{
///
///MyConvertµÄժҪ˵Ã÷¡£
///
public class MyConvert
{
public MyConvert()
{
//ÔÚ´ËÌí¼Ó¹¹Ô캯ÊýÂß¼
}
public bool WriteFile(string strText,string strContent,string strAuthor)
{
string path=HttpContext.Current.Server.MapPath("/TesConvert/news/");//¶¨ÒåhtmlÎļþ´æ·Å·¾¶
Encoding code=Encoding.GetEncoding("gb2312");//¶¨ÒåÎÄ×Ö±àÂë
//¶ÁÈ¡Ä£°åÎļþ
string temp=HttpContext.Current.Server.MapPath("TesConver/text.html");
StreamReader sr=null;
StreamWriter sw=null;
string str="";
try{
sr=new StreamReader(temp,code);
str=sr.ReadToEnd();//¶ÁÈ¡Îļþ
}catch(Exception exp){
HttpContext.Current.Response.Write(exp.Message);
HttpContext.Current.Response.End();
sr.Close();
}
string htmlfilename=path+DateTime.Now.ToString("yyyyMMddHHmmss")+".html";
//Ìæ»»ÄÚÈÝ
//Õâʱ£¬Ä£°åÎļþÒѾ¶ÁÈëµ½Ãû³ÆΪstrµÄ±äÁ¿ÖÐÁË
str=str.Replace("ShowArticle",strText);//Ä£°åÒ³ÖеÄShowArticle
str=str.Replace("title",strText);
str=str.Replace("content",strContent);
str=str.Replace("author",strAuthor);
//дÎļþ
try{
sw=new Strea
Ïà¹ØÎĵµ£º
public class SqlCheck
{
public SqlCheck()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
public SqlConnection oconn()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["StudyConnectionString"] ......
TreeView Web ·þÎñÆ÷¿Ø¼þÓÃÓÚÒÔÊ÷ÐνṹÏÔʾ·Ö²ãÊý¾Ý£¬ÈçĿ¼»òÎļþĿ¼¡£
Ò»¡¢TreeView ¿Ø¼þÖ§³ÖÏÂÃæµÄ¹¦ÄÜ£º
·×Ô¶¯Êý¾Ý°ó¶¨£¬¸Ã¹¦ÄÜÔÊÐí½«¿Ø¼þµÄ½Úµã°ó¶¨µ½·Ö²ãÊý¾Ý£¨Èç XML Îĵµ£©¡£
·Í¨¹ýÓë SiteMapDataSource ¿Ø¼þ¼¯³ÉÌṩ¶ÔÕ¾µãµ¼º½µÄÖ§³Ö¡£
·¿ÉÒ ......
TreeView Web ·þÎñÆ÷¿Ø¼þÌṩÁ˼¸¸ö¿É½øÐбà³ÌµÄʼþ¡£ÕâʹÄúÄܹ»ÔÚ·¢ÉúʼþʱÔËÐÐ×Ô¶¨ÒåÀý³Ì¡£
Ò»¡¢Ê¼þ
Ö»ÓÐÓû§Í¨¹ýһЩ²Ù×÷£¨ÈçÑ¡Ôñ¡¢Õ¹¿ª»òÕÛµþ½Úµã£©Óë¿Ø¼þ½»»¥Ê±£¬²Å»áÒý·¢ TreeView ¿Ø¼þʼþ¡£Èç¹ûÒÔ±à³Ì·½Ê½µ÷ÓÃÑ¡Ôñ¡¢Õ¹¿ª»òÕÛµþ·½·¨£ ......
ʹÓà ASP.NET TreeView ¿Ø¼þ¿ÉÒÔÇáËɵذ󶨵½Ö§³Ö IHierarchicalDataSource ½Ó¿ÚµÄÊý¾ÝÔ´£¬ÀýÈ磺XmlDataSource ÀàºÍ SiteMapDataSource Àà¡£´ËÍ⣬Äú»¹¿ÉÒÔÍêÈ«¿ØÖƽ«Êý¾ÝÔ´µÄÄÄЩ×Ö¶ÎÓÃÓÚ Text¡¢Value ºÍÆäËû TreeNode ÊôÐÔ¡£
Ò»¡¢°ó¶¨µ½ XML Îļþ
TreeView ¿Ø¼þÖ§³Öµ½ XML ......
... Ç°ÑÔ
ÔÚWebÓ¦ÓóÌÐòÖУ¬ÒýÈëAJAX£¬²»½ö¿ÉÒÔÌá¸ßÓû§ÌåÑ飨ҳÃæ¾Ö²¿Ë¢Ð£©£¬¶øÇÒ¿ÉÒÔÔÚÒ»¶¨³Ì¶ÈÉÏ£¬½µµÍWeb·þÎñÆ÷µÄ¹¤×÷¸ºÔغÍÏìӦʱ¼ä¡£
AJAX ʹÓÃJavascript£¬ÔÚ¿Í»§¶Ë£¨ä¯ÀÀÆ÷¶Ë£©£¬Í¨¹ýHttp(s)ÐÒ飬Ïò·þÎñÆ÷¶Ë £¨Web Server£©·¢ÆðÇëÇó£»·þÎñÆ÷¸ù¾ÝÇëÇóµÄURI£¬
Íê³ÉÏàÓ¦µÄÂß¼²Ù×÷£¬¶ûºó½«Ö´ÐÐµÄ ......