<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlike &#187; Html</title>
	<atom:link href="http://silverlike.net/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://silverlike.net</link>
	<description>We Like Silverlight</description>
	<lastBuildDate>Mon, 07 Dec 2009 06:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Strip HTML Tags</title>
		<link>http://silverlike.net/strip-html-tags/</link>
		<comments>http://silverlike.net/strip-html-tags/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 22:15:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://silverlike.net/strip-html-tags/</guid>
		<description><![CDATA[Corey referred a very useful code snippet provided by John which helps you to strip HTML Tags.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.85turns.com/2009/09/29/silverlight-tip-managing-html/" target="_blank">Corey</a> referred a very useful code snippet provided by <a href="http://books.google.com/books?id=o92WkIjDpAUC&amp;pg=PP1&amp;dq=john+papa+silverlight&amp;ei=kQ2uSqSkDYnOzQTHqK2ABQ#v=onepage&amp;q=html%20regex&amp;f=false" target="_blank">John</a> which helps you to strip HTML Tags.</p>
<p class="image"><a href="http://www.85turns.com/2009/09/29/silverlight-tip-managing-html/" target="_blank"><img style="display: inline" title="Strip HTML Tags" alt="Strip HTML Tags" src="http://silverlike.net/wp-content/uploads/2009/10/StripHTMLTags.jpg" width="450" height="250" /></a> </p>
<div class="demo-area">Silverlight Demo: <a class="new-window" href="http://silverlike.net/silverlight/index.php?xap=%2Fwp-content%2Fuploads%2Fxap%2FStripHtmlTags.xap&TB_iframe=true&caption=Strip+HTML+Tags&height=400&width=650" target="_blank">Click here to view</a></div>
<div class="csharp-area">csharp title: </div>
<pre class="brush: c-sharp;">
private string StripHtmlTags(string value){
    int length = 0;
    int.TryParse(value, out length);

    // Remove HTML tags and empty newlines and spaces and leading spaces
    string formattedValue = Regex.Replace(value as string, &quot;&lt;.*?&gt;&quot;, &quot;&quot;);
    formattedValue = Regex.Replace(formattedValue, @&quot;\n+\s+&quot;, &quot;\n\n&quot;);
    formattedValue = formattedValue.TrimStart(' ');
    formattedValue = HttpUtility.HtmlDecode(formattedValue);
    if(length &gt; 0 &amp;&amp; formattedValue.Length &gt;= length)
        formattedValue = formattedValue.Substring(0, length - 1);
    return formattedValue;
}</pre>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/strip-html-tags/" title="http://silverlike.net/strip-html-tags/" target="_blank">Click here</a></div>
<div class="reference-info"><strong>Data Driven Services with Silverlight 2:</strong> <a href="http://silverlike.net/strip-html-tags/" title="http://silverlike.net/strip-html-tags/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=697&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/strip-html-tags/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk

Served from: shareelements.silverlighteffect.com @ 2012-05-19 02:28:18 -->
