2010-04-16 80 views
1

我自定義ajax html編輯器。我創建了一個派生自ajax html編輯器的類,並且重寫了FillTopToolbar()方法來限制工具欄按鈕。我想在我的aspx頁面中使用這個。無法使用自定義的Ajax HTML編輯器

<%@ Register namespace="Content" tagprefix="edit" %> 
<edit:MyEditor runat="server" Width="100%" Height="250px"/> 

我可以在我的aspx頁面看到編輯器。 問題是當我給一個ID,以控制

<edit:MyEditor ID="htmlEditor" runat="server" Width="100%" Height="250px"/> 

我在下面線設計文件得到一個錯誤。

protected global::Content.MYHTMLEditor htmlEditor; 

我無法在後面的代碼中使用它。我使用VS 2010

回答

1

我不知道這是否會幫助,但試圖把這個在您的代碼隱藏文件的頂部:

using AjaxControlToolkit.HTMLEditor; 

這樣做我能programatticaly創建一個編輯器並訪問其成員:

Editor tempEditor = new Editor();