45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
|
|
<%@ WebHandler Language="C#" Class="getContent" %>
|
|||
|
|
/**
|
|||
|
|
* Created by visual studio 2010
|
|||
|
|
* User: xuheng
|
|||
|
|
* Date: 12-3-6
|
|||
|
|
* Time: <20><><EFBFBD><EFBFBD>21:23
|
|||
|
|
* To get the value of editor and output the value .
|
|||
|
|
*/
|
|||
|
|
using System;
|
|||
|
|
using System.Web;
|
|||
|
|
|
|||
|
|
public class getContent : IHttpHandler {
|
|||
|
|
|
|||
|
|
public void ProcessRequest (HttpContext context) {
|
|||
|
|
context.Response.ContentType = "text/html";
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
string content = context.Server.HtmlEncode(context.Request.Form["myEditor"]);
|
|||
|
|
string content1 = context.Server.HtmlEncode(context.Request.Form["myEditor1"]);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//-------------
|
|||
|
|
|
|||
|
|
//<2F><>ʾ
|
|||
|
|
context.Response.Write("<script src='../uparse.js' type='text/javascript'></script>");
|
|||
|
|
context.Response.Write(
|
|||
|
|
"<script>uParse('.content',{"+
|
|||
|
|
"'highlightJsUrl':'../third-party/SyntaxHighlighter/shCore.js',"+
|
|||
|
|
"'highlightCssUrl':'../third-party/SyntaxHighlighter/shCoreDefault.css'"+
|
|||
|
|
"})"+
|
|||
|
|
"</script>");
|
|||
|
|
|
|||
|
|
context.Response.Write("<22><>1<EFBFBD><31><EFBFBD>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD>ֵ");
|
|||
|
|
context.Response.Write("<div class='content'>" + context.Server.HtmlDecode(content) + "</div>");
|
|||
|
|
context.Response.Write("<br/><3E><>2<EFBFBD><32><EFBFBD>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD>ֵ<br/>");
|
|||
|
|
context.Response.Write("<textarea class='content' style='width:500px;height:300px;'>"+context.Server.HtmlDecode(content1)+"</textarea><br/>");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public bool IsReusable {
|
|||
|
|
get {
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|