"newbie" <an*******@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Hello,
anybody knows how i can strip out the html from a control's innerhtml to
show only the relevant text? i.e. <span id="test1" runat="server"><a
href="test1.htm">abcde</a><b>blah</b></span>
so that on my server side code, somehow i would get "abcde blah"??
thanks!
Provided it is xhtml compliant (i.e. no unclosed tags and case sensitive),
why not read the contents of each node, with an XmlTextReader? Then
concatenate each node's value using a StringBuilder.
ms-help://MS.NETFrameworkSDK/cpref/html/frlrfSystemXmlXmlTextReaderClassctor
Topic.htm
....and see the example at bottom for how to use the XmlTextReader.
R.