Hi, i am generating td in codebehide using string str ="";
and then concentrating it.
string str="";
string msg="ffffffffffffffffffffffffff ffffffffffffffff hhhhhhhhhhhhhhhhh gggggggggg ggggggggggggggg gggggggggggggggggg gggggggggggg jjjjjjjjjjjjjjj hello ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffff ffffffffff";
I am generating td in codebehind
if i reduced the length of string msg then height of td reduces and if i increase the string length of string msg then height of that td increase. Actually I want whenever the td has two line of text ,I want a scroll bar sbould be appear to my uppermost div.The data in the td is coming from database ,it can be of any size.also there can be n number of td (its dynamic).I want srollbar in uppermost div .
For this i had done some RND as
first i have find how much lengh the first line can take let say 200
then i have check if(len>400)
{
divid.Attributes.Add("style", "height:50px;overflow:auto;");
}
Its giving me what i want but in some cases it fails ,this is not 100% solution .I Want a 100% solution.I want to determine number of line td will increase .Please Help