Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7845255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:10:04+00:00 2026-06-02T17:10:04+00:00

<asp:DetailsView ID=DetailsView1 runat=server DataSourceID=SqlDataSource1 AutoGenerateRows=False DataKeyNames=ID DefaultMode=Insert > … <asp:TextBox ID=ShortExcerptTextBox runat=server Text='<%#Bind(ShortExcerpt) %>’

  • 0
<asp:DetailsView ID="DetailsView1" runat="server"
DataSourceID="SqlDataSource1" AutoGenerateRows="False"
DataKeyNames="ID" DefaultMode="Insert" >

…

<asp:TextBox ID="ShortExcerptTextBox" runat="server"
Text='<%#Bind("ShortExcerpt") %>' class="mceEditor"
TextMode="MultiLine"></asp:TextBox>

this is the code i have.

the problem is that i need to somehow HttpUtility.HtmlDecode it there in the #Bind("ShortExcerpt") somehow, but don’t know how.

the original issue is that tinyMCE (rich text editor) encodes the text by itself but does not decode it on read. a long story 😛

so please just, someone, explain, how to HttpUtility.HtmlDecode the text that gets read into #Bind("ShortExcerpt") please?

thnx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:10:05+00:00Added an answer on June 2, 2026 at 5:10 pm

    I don’t think that you can use HtmlDecode with Bind.

    So either try to HtmlDecode the TextBox in codebehind:

    <asp:TextBox ID="ShortExcerptTextBox" runat="server"
        Text='<%# Eval("ShortExcerpt") %>' 
        OnDataBinding="ShortExcerptTextBox_DataBinding" class="mceEditor"
        TextMode="MultiLine">
    </asp:TextBox>
    
    
    protected void ShortExcerptTextBox_DataBinding(object sender, EventArgs e)
    {
        var txt = (TextBox)sender;
        txt.Text = HttpUtility.HtmlDecode(txt.Text);
    }
    

    or try to use Eval instead(if that is acceptable):

    <asp:TextBox ID="ShortExcerptTextBox" runat="server"
        Text='<%# HttpContext.Current.Server.HtmlDecode((string)Eval("ShortExcerpt")) %>' 
        class="mceEditor"
        TextMode="MultiLine">
    </asp:TextBox>
    

    Both not tested yet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I write code like this: <asp:DetailsView ID=DetailsView1 Runat=server DataSourceID=Vote DefaultMode=Insert AutoGenerateRows=False DataKeyNames=id Width=352px
<asp:DetailsView ID=DetailsView1 runat=server AutoGenerateRows=False DataSourceID=TimeEntriesDataSource RowStyle-VerticalAlign=Top DefaultMode=Insert HeaderStyle-HorizontalAlign=Center BackColor=White BorderColor=#336666 BorderStyle=Double BorderWidth=3px CellPadding=4 OnItemInserted=DetailsView1_ItemInserted
I have a DetailsView like this: <asp:DetailsView ID=detailsView1 runat=server DataSourceID=edsdetailsView AutoGenerateRows=False CssClass=pretty-table> <Fields> <asp:TemplateField
I have a control that look something like this: <asp:DetailsView ID=dvUsers runat=server DataSourceID=odsData DataKeyNames=Id>
Ok so i have a DetailsView like so... <asp:DetailsView DataSourceID=sqldsNewItem CssClass=marginLeftRightBottom10px DefaultMode=Insert FieldHeaderStyle-CssClass=dwHeader GridLines=None
I have this markup: <asp:DetailsView ID=dvDatabase OnModeChanging=dvDatabase_ModeChanging> <HeaderTemplate> <asp:Button ID=btnView runat=server CausesValidation=False CommandName=Cancel Text=View
<asp:DetailsView... <asp:TemplateField HeaderText=My CheckBox SortExpression=DataID > <InsertItemTemplate> <asp:CheckBox ID=T01cbx runat=server Visible =false Checked='<%# Bind(DataID)
I have 2 DetailsView. The first one is hidden (display:none) with DefaultMode=Insert, has RequiredFieldValidator
I'm using an asp:DetailsView control with auto generated Edit and Insert buttons. So far
I have a DetailsView in Insert mode: <asp:CommandField ShowInsertButton=True ButtonType=Button ControlStyle-CssClass=myButton InsertText=My Insert text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.