ÔÚasp.netÖÐÉú³ÉhtmlÎļþ´úÂëÈçÏÂ
ÔÚasp.netÖÐÉú³ÉhtmlÎļþ´úÂëÈçÏÂ
public static bool CreatHtmlPage(string[] strNewsHtml, string[] strOldHtml, string strModeFilePath, string strPageFilePath)
{
bool Flage = false;
StreamReader ReaderFile = null;
StreamWriter WrirteFile = null;
//ÐÞ¸Ämode.htmµ½incĿ¼ÏÂ
strModeFilePath = "../inc/" + strModeFilePath;
string FilePath = HttpContext.Current.Server.MapPath(strModeFilePath);
Encoding Code = Encoding.GetEncoding("gb2312");
string strFile = string.Empty;
try
{
ReaderFile = new StreamReader(FilePath, Code);
strFile = ReaderFile.ReadToEnd();
}
catch (Exception ex)
{
throw ex;
}
finally
 
Ïà¹ØÎĵµ£º
Ê×Ò³£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
ÎÊÌâÒ»£º¼ò»¯°æWindows XPÉϰ²×°IIS5.1²½Öè
¼ò»¯°æXP²Ù×÷ϵͳµÄ“¿ØÖÆÃæ°å-->Ìí¼Ó/ɾ³ý³ÌÐò-->Ìí¼Ó/ɾ³ýWindows×é¼þ”ÖÐûÓГInternetÐÅÏ¢·þÎñ£¨IIS£©”Õâ¸ö°²×°Ñ¡ÏÓÚÊÇ×è°ÁËIISµÄÕý³£°²×°£¬Í¨¹ýÒ»·¬ÍøÉϲéÔÄ£¬ÖÕÓÚÕÒµ½Á˽â¾ö·½·¨£¬Æäʵ¿ÉÒÔ°´ÕÕÈçϲ½Öè½â¾ö£º
£¨Ò»£©Ê×ÏÈÔÚ“¿ªÊ¼&r ......
public void MyGetDepart()
{
string sSql = @"select DepartId,DepartName as 'Ç廪¸½ÖÐ',ParentId from sDepart";
DataTable table = CommClass.GetDataTable(sSql);//BoolDAL.DbHelper.GetDataTabl ......
1¡¢¿ØÖÆGridView¿Ø¼þÖÐÄÚÈݵĻ»ÐÐ
GridView1.Attributes.Add("style","word-break:keep-all;word-wrap:normal");//Õý³£»»ÐÐ
GridView1.Attributes.Add("style","word-break:break-all;word-wrap:break-word");//×Ô¶¯»»ÐÐ
2¡¢É¾³ýGridView¿Ø¼þÐÐÐÅÏ¢µ¯³öÈ·ÈÏÌáʾ¿ò
ÔÚGridViewµÄRowDataBound()ʼþÖÐÌ ......