开发者

WYSIWYG editor in asp.net page error

开发者 https://www.devze.com 2023-02-15 15:23 出处:网络
I am using an open source wysiwyg editor on one of my asp.net web pages to create news pages...On one page It is put into place like this:

I am using an open source wysiwyg editor on one of my asp.net web pages to create news pages... On one page It is put into place like this:

Registered at top of asp.net web page...

<%@ Register Src="~/WebUserControls/HTMLEditorControl.ascx" TagName="HTMLEditorControl" TagPrefix="uc2" %>

Incorporated into the page:

<div>
      <uc2:HTMLEditorControl ID="HelpTextBox" runat="server" />
</div>

In the code behind there is a Save method that 开发者_StackOverflowbasically saves the above editor data using the id:

dataset.column = htmlTextArea.GetHTML ;

When I try to bring up the page with the editor, I get the error: 'WYSIWYG' is undefined at Line 900, which is:

<script language="javascript" type="text/javascript" > 
    WYSIWYG.attach('ctl00_ContentPlaceHolder_HelpTextBox_htmlTextArea');
</script>

What's confusing, I have another page set up identically, that produces the same WYSIWYG.attach source, but it handles it with no problem at all. The only difference is the names of the pages. The page that works produces the following, with no problem:

<script language="javascript" type="text/javascript" > 
    WYSIWYG.attach('ctl00_ContentPlaceHolder_htmlTextArea_htmlTextArea');
</script>

So I'm at a loss...


Does the name of your code-behind class match the class name of your aspx page? Does the aspx page point to the correct code behind file?

My guess is that you copied and pasted but forgot to change that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号