<?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>SolidPitch &#187; formatting</title>
	<atom:link href="http://www.solidpitch.com/tag/format-data-field/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solidpitch.com</link>
	<description>Video and Web Development</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:18:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>ASP VB.NET Format Phone Number For Masked Input</title>
		<link>http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/</link>
		<comments>http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/#comments</comments>
		<pubDate>Mon, 04 May 2009 19:33:54 +0000</pubDate>
		<dc:creator>Dragos</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[formatting]]></category>

		<guid isPermaLink="false">http://www.webfixtech.com/blog/?p=101</guid>
		<description><![CDATA[In order to be able to display phone numbers in text fields you need to provide e well formatted string.]]></description>
			<content:encoded><![CDATA[<p>In order to be able to display phone numbers in text fields masked by Josh Bush&#8217;s <a rel="bookmark" href="http://digitalbush.com/projects/masked-input-plugin/" target="_blank">jQuery Masked Input Plugin </a> you need to provide e healthy string after reading the value from the database. This code snippet seemed to work for us quite well:</p>
<p>Dim regPhone As New Regex(&#8220;[^0-9]&#8220;)</p>
<p>If Trim(Phone).Length &gt; 0 Then<br />
txtPhone.Text = String.Format(&#8220;{0:(###) ###-####}&#8221;, CType(regPhone.Replace(Trim(Phone), [String].Empty), Int64))<br />
or just simply:<br />
txtPhone.Text =regPhone.Replace(Trim(Phone), [String].Empty))<br />
End If</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;t=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=ASP+VB.NET+Format+Phone+Number+For+Masked+Input+-+http://tinyurl.com/2eujcne&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=ASP+VB.NET+Format+Phone+Number+For+Masked+Input&amp;body=Link: http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A In%20order%20to%20be%20able%20to%20display%20phone%20numbers%20in%20text%20fields%20you%20need%20to%20provide%20e%20well%20formatted%20string." rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input&amp;summary=In%20order%20to%20be%20able%20to%20display%20phone%20numbers%20in%20text%20fields%20you%20need%20to%20provide%20e%20well%20formatted%20string.&amp;source=SolidPitch" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-hotmail">
			<a href="http://mail.live.com/?rru=compose?subject=ASP+VB.NET+Format+Phone+Number+For+Masked+Input&amp;body=Link: http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A In%20order%20to%20be%20able%20to%20display%20phone%20numbers%20in%20text%20fields%20you%20need%20to%20provide%20e%20well%20formatted%20string." rel="nofollow" class="external" title="Email this via Hotmail">Email this via Hotmail</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/&amp;title=ASP+VB.NET+Format+Phone+Number+For+Masked+Input&amp;desc=In%20order%20to%20be%20able%20to%20display%20phone%20numbers%20in%20text%20fields%20you%20need%20to%20provide%20e%20well%20formatted%20string." rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.solidpitch.com/2009/05/04/asp-vbnet-format-phone-number-for-masked-input/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

