Ajax HTML编辑器问题 [英] Issue with Ajax HTML Editor

查看:76
本文介绍了Ajax HTML编辑器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Code项目,

我在ASP .NET Web应用程序中使用Ajax,尽管我包括了AjaxControlToolkit,但在打开具有HTML编辑器的页面时却遇到了此类错误,

Hello Code project,

I''m using Ajax in ASP .NET Web Application, though I have included AjaxControlToolkit, I''m getting this kind of error while opening the page which has HTML Editor,

Server Error in '/' Application.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



//这是我的代码



//this is my code

<%@ Page Title="Para IV Database" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="OurServices_ParaIVPlus.aspx.cs" Inherits="MP.WebForm3" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkitControls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .headerParaIV
        {
            background-color:#804000;
            color:White;
            font-family:Segoe UI Semibold;
            font-size:14px;
            padding:5px;
            margin:2px;
            cursor:pointer;
            border-radius:5px;
        }

        .headerParaIVSelected
        {
            background-color:#7e460d;
            color:White;
            font-family:Segoe UI Semibold;
            font-size:14px;
            padding:5px;
            margin:2px;
            cursor:pointer;
            border-radius:5px;
        }

        .contentParaIV
        {
            font-family:Segoe UI Semibold;
            font-size:14px;
            padding:5px;
        }

    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div id="bannerHeader" class="bannerBgStyle">
        <div id="Div1" class="bannerHeaderStyle">PARA IV <i>Plus</i><sup>TM</sup> Search</div>
        <br /><br />
    </div>

    <br /><br />

    <div>
        <AjaxToolkitControls:Accordion ID="accordion2" runat="server" FadeTransitions="true" TransitionDuration="350"

        HeaderCssClass="headerParaIV" HeaderSelectedCssClass="headerParaIVSelected" ContentCssClass="contentParaIV">
            <Panes>

                <AjaxToolkitControls:AccordionPane ID="bybrandnamepane" runat=server>
                    <Header>Search by Brand Name</Header>
                    <Content>
                        Seacrh by Brand Name <br />
                        <asp:TextBox ID="bybrandnametxt" runat="server"></asp:TextBox>
                    </Content>
                </AjaxToolkitControls:AccordionPane>

                <AjaxToolkitControls:AccordionPane ID="bygenericnamepane" runat=server>
                    <Header>Search by Generic Name</Header>
                    <Content>
                        Seacrh by Generic Name <br />
                        <asp:TextBox ID="bygenericnametxt" runat="server"></asp:TextBox>
                    </Content>
                </AjaxToolkitControls:AccordionPane>

                <AjaxToolkitControls:AccordionPane ID="byadvancesearchpane" runat="server">
                    <Header>Advance Search</Header>
                    <Content>

                    </Content>
                </AjaxToolkitControls:AccordionPane>

                <AjaxToolkitControls:AccordionPane ID="AccordionPane2" runat="server">
                    <Header>Un explored PARA IVs</Header>
                    <Content>

                    </Content>
                </AjaxToolkitControls:AccordionPane>
            </Panes>
        </AjaxToolkitControls:Accordion>
    </div>

    <br /><br />

    <center>
        <div style="height: 486px">
            <asp:Image ID="paraIVimage" runat="server" ImageUrl="~/MP-Images/paraIV.gif"

                Height="273px" />
            <br />

        </div>
    </center>

    <cc1:Editor ID="editor1" runat="server" AutoFocus="true" />
</asp:Content>




我在Google上遇到了此问题,但未找到合适的解决方案,因此请为我提供合适的解决方案...




I have google this problem but not found the proper solution, so please help me with appropriate solution...

推荐答案

您好! 在上面的代码中,没有什么可能在编译中产生问题.
一切都很好.

可能是您的母版页包含一些错误的代码.
确保所有打开的标签都已正确关闭且放在正确的位置.

玩得开心&享受编码!
hello !
there is nothing that might create problem in compilation in the above code.
Every thing is fine.

May be your master page contains some wrong code.
Be sure about all open tag is closed properly and are in the right place.

have fun & enjoy coding!


这篇关于Ajax HTML编辑器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆