顯示具有 程式 標籤的文章。 顯示所有文章
顯示具有 程式 標籤的文章。 顯示所有文章

2010年10月22日 星期五

錯誤:AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts.

今天在測試 Ajax Control Toolkit 裡的 ModalPopupExtender 一直出現錯誤如下:
"AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."

孤狗了一下,發現原因竟然是因為新版的 Control Toolkit ,語法改了,MyGod
原本語法如下:

新的語法如下:


前面的 asp 就看你載入 AjaxControlToolkit 時,TagPrefix 定義為什麼了!
我的是:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

說明一下:目前測試的 Ajax Control Toolkit 是 3.5 版的
萬一以後又改了... @^@a
這樣鳥了嗎?
微軟可不可以不要改來改去啊?
已經夠亂了,真機車!

2010年10月16日 星期六

fckEditor 的工具列設定


fckeditor/fckconfig.js
裡面有一段

FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;

這是工具列的設定,工具列的代號是 ["Default"]
所以自己也可以設另一個代號的工具列,例如:


FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;

這是他原本設定的基本工具列 "Basic"],
'-' 是工具與工具之間的分隔線
[] 括起來的代表是同一組的工具
, 如果有很多組[],則用逗號做分隔

設定完如何應用到ASP.NET中呢?



在 ToolbarSet 的屬性中填入 Toolbar 的代號
例如:Basic 或是 Default
這樣工具列就會改成你設定的那一組了!