I have a substring what contains HTML tag and I need to shorten it but display it with the same formatting as it appears on the string.
It doesn’t have to be exactly X characters long, but it should be short enough to be displayed inside a panel with a certain width and height?
Is there any way I can achieve this using c#?
What about using CSS? I.e. displaying the panel with a fixed height regardless of its content?
Thanks..
Example: I have the following panel containing a label that contains text with html tags:

I need to remove the scroll bar without making the panel longer but keeping this height & this width..
If you have following html code:
You can provide css to hide the scroll bars,
heightandwidthvalues are just for example purpose.overflow:hiddendoes not let the content of the div to expand out side the div.you will find more information on
overflowhere.