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 6762721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:23:27+00:00 2026-05-26T14:23:27+00:00

I have a form with a number of asp:TextBoxes. The user is able to

  • 0

I have a form with a number of asp:TextBoxes. The user is able to edit the text within these text boxes, and when the ‘SAVE’ button is pressed, these new values are written to a database.

I have 3 text boxes in total, and the first 2 text boxes’ new values are passed on to the code behind without any problem. However, the 3rd text box’s old content is passed onto the server, rather than the user-edited data.

The markup for the problematic textbox is shown below:

   <asp:TextBox ID="descriptionBox" ReadOnly="true" style" runat="server" TextMode="MultiLine" Text='<%# Eval("Description") %>'></asp:TextBox>

The following is the C# code which attempts to get the contents of the text box after the user has edited it. Please note that these text boxes are placed in a Repeater:

string description = ((TextBox)e.Item.FindControl("descriptionBox")).Text;

Could anyone suggest what the problem could be? The other text boxes use the same exact markup and code, and they work just fine.

  • 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-05-26T14:23:28+00:00Added an answer on May 26, 2026 at 2:23 pm

    See the MSDN documentation – it’s the ReadOnly attribute causing this problem:

    The Text value of a TextBox control with the ReadOnly property set to
    true is sent to the server when a postback occurs, but the server does
    no processing for a read-only text box.

    The alternative is to do it on the client side:

    descriptionBox.Attributes["readonly"] = "readonly"

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

Sidebar

Related Questions

I have a form in asp with two text boxes. If user enters a
I have an asp.net address form with a bunch of text boxes (street, number,
I have an ASP.NET web form which I am adding a variable number User
I have a form where a user can enter the number of students that
i have a form with two modes one that allows edit (value of text
I have a form with a few text-boxes and a Grid-view. There is this
I have got an asp.net form, with a jqgrid on it. The user can
I have a for which is built within an ASP.net usercontrol. This form is
I have a single page asp.net 4.0 form with couple of textboxes in divs
I have a fairly large input form with a number of ASP.NET Validators on

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.