Ajax控件工具包HTML编辑器值不在c#中读取

时间:2016-06-01 19:53:16

标签: c# asp.net c#-4.0 ajaxcontroltoolkit html-editor

我正在使用ajax控件工具包HTML编辑器。我正在尝试检索编辑器值,但我收到错误

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<asp:GridView ID="uxResultsGrid" runat="server" Width="100%" AllowSorting="True"
                        AutoGenerateColumns="False" PageSize="25" AllowPaging="True" BackColor="White"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" RowStyle-VerticalAlign="Top"
                        RowStyle-HorizontalAlign="Left" OnPageIndexChanging="uxResultsGrid_PageIndexChanging"
                        OnSorting="uxResultsGrid_Sorting" OnRowEditing="uxResultsGrid_RowEditing">
                        <Columns>
                            <asp:TemplateField HeaderText="Action" HeaderStyle-ForeColor="Blue">
                                <ItemTemplate>
                                    <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" CssClass="FormsManagerButton"
                                        CausesValidation="False" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Key" SortExpression="configkey">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("configkey") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Value" SortExpression="configval">
                                <EditItemTemplate>
                                    <cc1:Editor ID="HTMLeditor" runat="server" Width="100%" Height="200" Content='<%# Bind("configval") %>' />
                                  <%--  <asp:TextBox ID="editor" runat="server" Width="100%" Text='<%# Bind("configval") %>' />--%>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("configval") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="40%" Wrap="True" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Created" SortExpression="created">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("created") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Created By" SortExpression="created_by">
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("created_by") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Updated" SortExpression="updated">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("updated") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Updated By" SortExpression="updated_by">
                                <ItemTemplate>
                                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("updated_by") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Position="TopAndBottom" />
                        <PagerStyle HorizontalAlign="Left" />
                        <RowStyle HorizontalAlign="Left" VerticalAlign="Top"></RowStyle>
                    </asp:GridView>

我正在尝试使用c#

检索已编辑的值
var configeditvalue= HTMLeditor.Content;

但我收到以下错误

Error   94  The name 'HTMLeditor' does not exist in the current context 

0 个答案:

没有答案
相关问题