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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:31:14+00:00 2026-05-24T00:31:14+00:00

I am entering some random text with space and in a text box during

  • 0

I am entering some random text with space and in a text box during insert mode. Now in view mode I want to see those text as it was entered. For that I am using multiline text box and setting its border=none as he text should look like as it is label. I dont want to see any scroll bars. So I set column property=50 and assigning rows dynamically but still its not working.
Here is the comments that I have inserted
“Testing commentsghgjhgvhgvhgvkhbvfjsghksjnlksnvs;vmns;lkfgnskljgklk lkj;lkjlkjlk lkj’lkj

sdfgsg

dfg”

The code is as below

txtComments.Rows = (int)Math.Ceiling((double)dtSky.Rows[0]["Comments"].ToString().Length / 50);

txtComments.Text = dtSky.Rows[0]["Comments"].ToString();

How can I do this? I can use lable as per requirements….

  • 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-24T00:31:15+00:00Added an answer on May 24, 2026 at 12:31 am

    You say I want to see the text as it was entered.. as a label. For this you shouldn’t use a textbox with no border but a html element more suited to displaying text. Either a div or a span or just a plain p.

    To render a div in asp.net you could use an asp:literal with some html wrapping it

    <div>
        <asp:Literal ID="commentsLiteral" runat="Server"></asp:Literal> 
    <div>
    

    in your code behind

    commentsLiteral.Text = dtSky.Rows[0]["Comments"].ToString();
    

    Hope this helps

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

Sidebar

Related Questions

If am entering some values in text box it should be simultaneously displayed in
Is there a way to disable entering multi-line entries in a Text Box (i.e.,
I have a table view that has embedded UITextFields for entering some data. It
i Want To Set a Tooltip For a TextBox in asp.net when entering Some
I am entering some code into a Hudson Server run on a Ubuntu box
I'm working on an interactive shell where the user is entering some text, and
I am using a rich text box to enter some variables. I am restricting
i m using text field to get some integer value. After entering value and
How can i stop the host machine entering standby mode while my application is
so i use mysql_real_escape_string to sanitize some user input before entering it into the

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.