Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. avoid scroll bar in text box

avoid scroll bar in text box

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-net
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deepthy p m 0
    wrote on last edited by
    #1

    i am using asp.net + C# in my page i use label for "Bio post" ,to display.If the user enter datas like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"etc. with out enter any space. the alignment problem will occur .i want to display all the details like "aaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaa" "aaaaaaaaa" .Is it possible.I dont need scroll bar in that. if the text not fix in specified width of that label it will come next line. for eg:in gmail if we type subect only letters like "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 " but when we open it the subject display properly like "111111111111111111111111111111111111111111111" "111111111111111111111111111111111111111111111" "111111111111111111111111111111111" is any way to solve like this .and this fix in page width. I use text box to display data .but i dont need that scroll bar when we set wrap="true".i need to display all the details with out scroll bar.

    A 1 Reply Last reply
    0
    • D deepthy p m 0

      i am using asp.net + C# in my page i use label for "Bio post" ,to display.If the user enter datas like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"etc. with out enter any space. the alignment problem will occur .i want to display all the details like "aaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaa" "aaaaaaaaa" .Is it possible.I dont need scroll bar in that. if the text not fix in specified width of that label it will come next line. for eg:in gmail if we type subect only letters like "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 " but when we open it the subject display properly like "111111111111111111111111111111111111111111111" "111111111111111111111111111111111111111111111" "111111111111111111111111111111111" is any way to solve like this .and this fix in page width. I use text box to display data .but i dont need that scroll bar when we set wrap="true".i need to display all the details with out scroll bar.

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      You mean textbox will automatically adjust its height on user entry ?? I think you need to use Javascript to do this. :)

      function adjustSize()
      {
      var tbData = document.getElementById('tb').value;
      document.getElementById('tb').style.width = 10 + tbData.length * 4 +'px';
      }

      Something like this.. But you need to adjust the code according to your need. :-D

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Microsoft Bing MAP using Javascript
      CLR objects in SQL Server 2005
      Uncommon C# Keywords
      /xml>

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups