HTML editor gives empty value in code behind after postback

justJR

New Member
I have multy control and a HtmlEditor in the page. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"> <Triggers> <asp:PostBackTrigger ControlID="SaveButton" /> </Triggers> <ContentTemplate> <cc1:TabContainer CssClass="visoft__tab_xpie7" runat="server" ID="tab" ActiveTabIndex="0" Width="100%" Font-Size="11px"> <cc1:TabPanel runat="server" HeaderText="??????? ????" ID="TabPanel1"> <ContentTemplate> <div class="row"> <span style="width: 100px" class="rowtitle">Category</span> <asp:DropDownList ID="CategoryDropDownList" runat="server" Width="200px" AutoPostBack="True" DataTextField="Name" DataValueField="ID" OnSelectedIndexChanged="CategoryDropDownList_SelectedIndexChanged" /> <asp:RequiredFieldValidator ID="CategoryRFV" runat="server" ControlToValidate="CategoryDropDownList" ForeColor="Red" ValidationGroup="Save" ErrorMessage="?????? ?? ?????? ????." Text="*" /> </div> <div class="row" style="height: 300px"> <span style="width: 100px" class="rowtitle">??????? ????</span> <editor:HtmlEditor Style="float: left" runat="server" Width="600px" ID="DescriptionHtmlEditor" /> <asp:RequiredFieldValidator Text="*" ID="DescriptionRFV" runat="server" ControlToValidate="DescriptionHtmlEditor" ForeColor="Red" ValidationGroup="Save" ErrorMessage="??????? ?? ???? ???? ." /> </div> </ContentTemplate> </cc1:TabPanel></cc1:TabContainer> <div class="row" style="text-align: center"> <asp:Button ID="SaveButton" class="button" Width="100px" OnClick="SaveButton_Click" runat="server" ValidationGroup="Save" Text="?????" /> </div> </ContentTemplate></asp:UpdatePanel>All controls are located inside an UpdatePanel.when i was trying to access the HTML editors text property after a partial postback of an updatepanel, it was empty. protected void OrderImageDropDownList_SelectedIndexChanged(object sender, EventArgs e){ string description= DescriptionHtmlEditor.Text;//value is empty. }
 
Back
Top