Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

ASP.NET·ÀSQL×¢Èë½Å±¾³ÌÐò v2.0

public class SqlCheck
{
public SqlCheck()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼­
//
}

public SqlConnection oconn()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["StudyConnectionString"] ......

FCKeditor ÔÚASP.Net ÖеÄʹÓÃ˵Ã÷


FCKeditor ÔÚASP.Net ÖеÄʹÓÃ˵Ã÷
[ 2008-7-23 23:41:00 | By: »ª×Ó ]
 
2
ÍÆ¼ö
 
FCKeditor ÊÇÒ»¸öÔËÐÐÔÚä¯ÀÀÆ÷É쵀 Java Ó¦ÓóÌÐò¡£Ëû¿ÉÒÔ²»ÒÀÀµÈκηþÎñÆ÷¶ËÓïÑÔÔËÐС£²»¹ý£¬¸üºÃµÄʹÓ÷½·¨ÊÇÄãʹÓÃÒ»ÖÖ·þÎñÆ÷¶ËÓïÑÔÀ´µ÷ÓÃËû¡£
ÔÚASP.Net ÖУ¬ÓÐÒ»¸öÏֳɵŤ¾ß°ü¿ÉÒÔÈÃÄã°Ñ FCKeditor ×÷Î ......

ASP.NET ʹÓà XmlDataSource ¿Ø¼þɸѡÊý¾Ý


      ¿Éͨ¹ý½« XmlDataSource ¿Ø¼þµÄ XPath ÊôÐÔÉèÖÃΪ XPath ɸѡ±í´ïʽ£¬À´É¸Ñ¡¸Ã¿Ø¼þ¹«¿ªµÄ XML Êý¾Ý¡£Èç¹ûÒÑÖ¸¶¨¿ÉÀ©Õ¹Ñùʽ±íÓïÑÔ (XSL) Ñùʽ±íÀ´×ª»» XmlDataSource ¿Ø¼þ¹«¿ªµÄÊý¾Ý£¬ÔòÔÚת»»ºó»áÓ¦Óà XPath ɸѡ±í´ïʽ¡£
ÏÂÃæµÄ´úÂëʾÀýÑÝʾ°ó¶¨µ½ TreeView ¿Ø¼þµÄ XmlDataSource ¿Ø¼þ¡ ......

ASP.NET(C#)ͼƬÉÏ´«Ñ¹Ëõ³ÉËõÂÔͼµÄ´úÂë

// °´Ä£°æ±ÈÀýÉú³ÉËõÂÔͼ£¨ÒÔÁ÷µÄ·½Ê½»ñȡԴÎļþ£©
//Éú³ÉËõÂÔͼº¯Êý
//˳Ðò²ÎÊý£ºÔ´Í¼ÎļþÁ÷¡¢ËõÂÔͼ´æ·ÅµØÖ·¡¢Ä£°æ¿í¡¢Ä£°æ¸ß
//×¢£ºËõÂÔͼ´óС¿ØÖÆÔÚÄ£°æÇøÓòÄÚ
public static void MakeSmallImg(System.IO.Stream fromFileStream,string fileSaveUrl,System.Double templateWidth,System.Double templateHeight)
{ ......

ASP.NET ÈçºÎ£ºÅäÖöà¸öÕ¾µãµØÍ¼ºÍÕ¾µãµØÍ¼Ìṩ³ÌÐò


      ĬÈÏÇé¿öÏ£¬ASP.NET ÍøÕ¾µ¼º½Ê¹ÓÃÒ»¸öÃûΪ Web.sitemap µÄ XML Îļþ£¬¸ÃÎļþÃèÊöÍøÕ¾µÄ²ã´Î½á¹¹¡£µ«ÊÇ£¬Äú¿ÉÄÜҪʹÓöà¸öÕ¾µãµØÍ¼Îļþ»òÕ¾µãµØÍ¼Ìṩ³ÌÐòÀ´ÃèÊöÕû¸öÍøÕ¾µÄµ¼º½½á¹¹¡£
ÀýÈ磬Äú¿ÉÒÔ¾ßÓÐÒýÓÃ×ÓÕ¾µãµØÍ¼µÄÖ÷Õ¾µãµØÍ¼¡£Ö÷Õ¾µãµØÍ¼¿ÉÒÔÊÇ£º
<?xml version="1.0" encoding ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ