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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:42:19+00:00 2026-06-17T10:42:19+00:00

I create textbox by this code: <div style=clear:left;> <asp:TextBox TextMode=MultiLine runat=server ID=selectText ReadOnly=true Width=560px

  • 0

I create textbox by this code:

<div style="clear:left;">
    <asp:TextBox TextMode="MultiLine" runat="server" ID="selectText" ReadOnly="true" Width="560px" Height="50px"></asp:TextBox>
</div>

I fill it by this code:

elSelText.value = elSelText.value.substr(0, position) + chosenoption2.value + " ";

And then i try to send value in textbox to server, but it’s empty!

protected void btnUseSelectClick(object sender, EventArgs e)
    {
        sourceDetails.SelectCommand += " and " + selectText.Text;
        Session["FilterSelectCommand"] = sourceDetails.SelectCommand;
        tableResults.DataBind();
    }

On the advice I added AutoPostBack=”true”:

<div style="clear:left;">
    <asp:TextBox TextMode="MultiLine" runat="server" AutoPostBack="true" ID="selectText" ReadOnly="true" Width="560px" Height="50px"></asp:TextBox>
</div>

but it didn’t help

  • 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-17T10:42:20+00:00Added an answer on June 17, 2026 at 10:42 am

    Although it’s news to me, it seems that the ReadOnly property doesn’t keep track of changes from the client. If you want the “readonly” functionality but still get the value on the server, put the following in your Page_Load method:

    selectText.Attributes.Add("readonly", "readonly");
    

    And remove the ReadOnly (and AutoPostBack) property in the <asp:TextBox> tag.

    ( From: http://aspadvice.com/blogs/joteke/archive/2006/04/12/16409.aspx and http://forums.asp.net/t/1467081.aspx – it was a fairly quick find with Google)

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

Sidebar

Related Questions

I need to dynamically create textbox. This is my code, but with this I
I have a web application. On my page ive got this: <div id=myDiv runat=server
I've been attempting to create a resizable textbox (ASP.NET multiline TextBox / HTML textarea
This is a code snippet of my my Create.cshtml in my ASP.NET MVC3.. I
I create array: TextBox[] textarray = new TextBox[100]; Then in cycle set this params,
I need a textbox that only allows an IP address. I can create this
all, I wanted to create a multiline textbox but all the info i googled
I am using asp.net C# 2008, and I need to create a search textbox
I have to create a web form in ASP.NET. this is my HTML: <form
I using code from this blog Autocompletion Textbox in MVC Using jQuery but my

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.