avoid scroll bar in text box
-
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.
-
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.
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>