Click here to Skip to main content
15,924,402 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
ASP.NET
<%@ 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

>

What I have tried:

I am trying to retrieve the edited value using the c#

var configeditvalue= HTMLeditor.Content;
but i am getting the below error

Error 94 The name 'HTMLeditor' does not exist in the current context
Posted
Updated 1-Jun-16 10:11am
v3
Comments
Sergey Alexandrovich Kryukov 1-Jun-16 16:08pm    
HTMLEditor or HTMLeditor? :-)
—SA
trinadh velchuri 1-Jun-16 16:12pm    
<cc1:Editor ID="HTMLeditor" runat="server" Width="100%" Height="200" Content='<%# Bind("configval") %>' />

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900