FCKeditor在asp.net中的用法
1.下载组件:(要下载FCKeditor2.6.5.zip和FCKeditor.NET2.6.3版的2个zip包)
说明:
FCKeditor2.6.3.zip是其最新的文件和图片什么的;
FCKeditor.NET.zip是ASP.NET调用的DLL在里面。
2.分别解压后把FCKeditor2.6.3.zip里的fckeditor目录整个复制到网站中。
3.解压FCKeditor.NET.zip包后在FCKeditor.Net_2.2\bin\Debug目录里找到FredCK.FCKeditorV2.dll,将FredCK.FCKeditorV2.dll添加到工具箱上。
4.完了之后将控件拖到网页上:
5.现在已经完成了添加,现在要根据我们的需要来设置了……
进入FCKeditor文件夹,编辑 fckconfig.js 文件。
6.
修改
var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
改为
var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | php
7. 配置语言包。有英文、繁体中文等,这里我们使用简体中文。
修改
FCKConfig.DefaultLanguage = 'en' ;
为
FCKConfig.DefaultLanguage = 'zh-cn' ;
8.配置皮肤。有default、office2003、silver风格等,这里我们可以使用默认。
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
9.在编辑器域内可以使用Tab键。(1为是,0为否)
FCKConfig.TabSpaces = 0 ; 改为FCKConfig.TabSpaces = 1 ;
10.加上几种我们常用的字体的方法
修改
FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
为
FCKConfig.FontNames = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana'
11.基本的属性设置已经差不多了,要设置更多请参考一下属性表:
FCKConfig.CustomConfigurationsPath = '' ; // 自定义配置文件路径和名称
FCKConfigFCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css'; // 编辑区的样式表文件
FCKConfig.EditorAreaStyles = '' ; // 编辑区的样式表风格
FCKConfig.ToolbarComboPreviewCSS =''; //工具栏预览CSS
FCKConfig.DocType = '' ;//文档类型
相关文档:
ASP.NET 提供三种用于在出现错误时捕获和响应错误的主要方法:Page_Error 事件、Application_Error 事件以及应用程序配置文件 (Web.config)。
如果您不调用 Server.ClearError 或者捕获 Page_Error 或 Application_Error 事件中的错误,则将根据 Web.config 文件的 <customErrors> 部分中的设置处理错误。在 <cus ......
Application
1.Application用来保存所有用户共用的信息
2.在Asp时代,如果要保存的数据在应用程序生存期内不会或者很少发生改变,那么使用Application是理想的选择。但是在Asp.net开发环境中我们把类似的配置数据放在Web.config中。
3.如果要使用Application 要注意的是所有的写操作都要在Application_OnStart事件中完成 ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Timers;
using System.Data;
using System.Data.SqlClient;
namespace SMS_joke
{
/// <summary>
/// Global 的摘要说明。
/// </summary>
public class ......