Text wraping and Html tags
-
is there a built in way (in asp.net - c#) I can strip html tags from input string (validate), some function or built in class that provides such a functionality? Is there similar function in c# similar to php function StripHTMLTags()? And second question is there a function that wraps text, if it is longer then certain count of characters? I know there is built in requestValidate property of tag, but I want to make custom validation! Thanx a lot
-
is there a built in way (in asp.net - c#) I can strip html tags from input string (validate), some function or built in class that provides such a functionality? Is there similar function in c# similar to php function StripHTMLTags()? And second question is there a function that wraps text, if it is longer then certain count of characters? I know there is built in requestValidate property of tag, but I want to make custom validation! Thanx a lot
> strip html tags from input strin Use RegEx. This pattern works for me
<(.|\n)+?>
e.g.TextBox.Text = Regex.Replace(TextBox.Text, @"<(.|\n)+?>", ""); >And second question is there a function that wraps text, if it is longer then certain count of characters? But the browser should automatically wrap text to fit in it's container. What do you mean? regards, Paul Watson Bluegrass South Africa **Brian Welsch wrote:** _"blah blah blah, maybe a potato?"_ while translating my Afrikaans. [Crikey!](http://stormfront.typepad.com/) ain't life grand? [Einstein says...](http://babyurl.com/P4hvwl)
-
> strip html tags from input strin Use RegEx. This pattern works for me
<(.|\n)+?>
e.g.TextBox.Text = Regex.Replace(TextBox.Text, @"<(.|\n)+?>", ""); >And second question is there a function that wraps text, if it is longer then certain count of characters? But the browser should automatically wrap text to fit in it's container. What do you mean? regards, Paul Watson Bluegrass South Africa **Brian Welsch wrote:** _"blah blah blah, maybe a potato?"_ while translating my Afrikaans. [Crikey!](http://stormfront.typepad.com/) ain't life grand? [Einstein says...](http://babyurl.com/P4hvwl)