|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Automatically adjust TextBox's heightHi,
I have a questions regarding the TextBox webcontrol. I already have a textbox in fix width. But the number of contents (text) in the textbox is arbitrary. I set the textbox as mutlilines. I want to dynamically adjust the textbox 's height to fits for the number of characters in the textbox so as not to show vertical scroll bar. For instance , if there are 3 rows , the textbox's height equals to 3 rows , if there are 5 rows , the textbox's height equals to 5 rows. How can I do this ? Thank you, H. You would need to default it to multiline, with 1 row and set the style to
hide the scrollbars. Then in Javascript, change the number of lines based on the number of characters entered. An asp textbox renders an input type=text when the control is single line and a textarea when the control is multiline. So, you won't be able to dynamically change it from single to multi on the client. It is trivial on the server. -- Show quoteHide quoteStaff Consultant II - Enterprise Web Services - Cardinal Solutions Group Future Business Model - National City Mortgage "H." wrote: > Hi, > > I have a questions regarding the TextBox webcontrol. I already have a > textbox in fix width. But the number of contents (text) in the textbox is > arbitrary. I set the textbox as mutlilines. I want to dynamically adjust the > textbox 's height to fits for the number of characters in the textbox so as > not to show vertical scroll bar. For instance , if there are 3 rows , the > textbox's height equals to 3 rows , if there are 5 rows , the textbox's > height equals to 5 rows. How can I do this ? > > Thank you, > H.
Infragistics Ultra Web Grid Updating Problem
Listbox Webcontrol SelectedIndexChanged Event not working Who is the true Asp.Net MVP here? binding - DropDownList flaw/bug? Can't get the Microsoft Web Library Trying hard to implement globalisation. Strange error message(urgent help needeed) Finding the leftmost pixel in a piece of text when using GDI+ load event doesn't fire unless init event is present How to view properties of control inside table Client Side Calculation involving controls in datagrid template co |
|||||||||||||||||||||||