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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:10:07+00:00 2026-05-20T13:10:07+00:00

All, I am using an HTML control in my asp.net app.I run this as

  • 0

All,
I am using an HTML control in my asp.net app.I run this as a server control and programatically access this from my code behind(C#) class.Plase see the markup.
. The innerHTML property is set dynamically from code.My issue is if the InnerHTML is really long , i set line breaks at specific char intervals. That looks ok except for the horizontal line that appears between the text.

I need to display text like this

-----------This is my name 
blah blahhhhhh------------------ 

but right now it displays as

--------This is my name---------------
         blah blah blah   

Is there a way to set the line programaticcaly or using style?
thanks for 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-05-20T13:10:08+00:00Added an answer on May 20, 2026 at 1:10 pm

    You can do a few things :

    • set the width of your control so the text inside wraps automatically to the next line

    • Edit the content of the control, inserting line breaks where needed

    There’s no method to automatically transform text as your example shows. It is possible, but you might need to write it yourself.

    A warning here : you can measure the letters easily with "string".Length but it gives no guarantee to the actual width, in pixels, of the string (consider "iii" takes less room than "www" in non-fixed width fonts). If you want to measure pixels, it gets complicated fast, so your better off measuring the number of letters.

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

Sidebar

Related Questions

I do this all the time using VNC and it is very easy, but
I'm using this script to display all the images in a folder, but I
I am using: set constraints all deferred; (lots of deletes and inserts) commit; This
I need to match and remove all tags using a regular expression in Perl.
How can I get the start and end positions of all matches using the
Spending most of my time in Visual Studio and using all the IDE tools,
Using Firebird, I want to combine the results of two queries using UNION ALL,
Are all URLs encrypted when using TLS/SSL (HTTPS) encryption? I would like to know
I am using running a simple find all and paginating with willpaginate, but I'd
We're using Prototype for all of our Ajax request handling and to keep things

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.