谁能给个象这个BLOG一样的加亮显示代码并格式化的原代码?
谁能给个象这个BLOG一样的加亮显示代码并格式化的原代码?
public void CodeHighlighter_PostRender(object sender, System.EventArgs e)
{
if(IsPostBack)
{
string html=Codehighlighter1.Output.Replace("\"","\\\"");
html=html.Replace("\r\n","<br>\"+\r\n\"");
html=Dottext.Framework.Util.Globals.ReplaceSpace(html);
string imgpath=Dottext.Framework.Util.Globals.GetAppUrl(Request)+"Images/";
html=html.Replace("...","<img src='"+imgpath+"dot.gif'>");
//html=html.Replace("<div>",string.Empty);
//html=html.Replace("</div>",string.Empty);
//html=html.Replace(" "," ");
//html=html.Replace("\r","\"+\r");
//html=html.Replace("\n","\"\n");
/*System.IO.StreamWriter sw=new System.IO.StreamWriter("f:\\test.txt");
sw.Write(html);
sw.Flush();
sw.Close();*/
string divstr=@"<div style='BORDER-RIGHT: windowtext 0.5pt solid;PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px;PADDING-TOP: 4px; BORDER-LEFT: windowtext 0.5pt solid;WIDTH: 98%; BORDER-BOTTOM: windowtext 0.5pt solid;word-break:break-all'>";
Response.Write(@"
<script language='javascript'>
window.parent.returnValue = """ +divstr+html+@"</div>"";
window.parent.close();
</script>");
}
}
public void CodeHighlighter_PostRender(object sender, System.EventArgs e)
{
if(IsPostBack)
{
string html=Codehighlighter1.Output.Replace("\"","\\\"");
html=html.Replace("\r\n","<br>\"+\r\n\"");
html=Dottext.Framework.Util.Globals.ReplaceSpace(html);
string imgpath=Dottext.Framework.Util.Globals.GetAppUrl(Request)+"Images/";
html=html.Replace("...","<img src='"+imgpath+"dot.gif'>");
//html=html.Replace("<div>",string.Empty);
//html=html.Replace("</div>",string.Empty);
//html=html.Replace(" "," ");
//html=html.Replace("\r","\"+\r");
//html=html.Replace("\n","\"\n");
/*System.IO.StreamWriter sw=new System.IO.StreamWriter("f:\\test.txt");
sw.Write(html);
sw.Flush();
sw.Close();*/
string divstr=@"<div style='BORDER-RIGHT: windowtext 0.5pt solid;PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px;PADDING-TOP: 4px; BORDER-LEFT: windowtext 0.5pt solid;WIDTH: 98%; BORDER-BOTTOM: windowtext 0.5pt solid;word-break:break-all'>";
Response.Write(@"
<script language='javascript'>
window.parent.returnValue = """ +divstr+html+@"</div>"";
window.parent.close();
</script>");
}
}

浙公网安备 33010602011771号