<?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>Pressing the Red Button &#187; ASP.Net</title>
	<atom:link href="http://www.pressthered.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pressthered.com</link>
	<description>Adventures in Software Development</description>
	<lastBuildDate>Sun, 08 Jan 2012 21:28:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>NoWrap in ASP.Net</title>
		<link>http://www.pressthered.com/nowrap_in_aspnet/</link>
		<comments>http://www.pressthered.com/nowrap_in_aspnet/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 06:26:03 +0000</pubDate>
		<dc:creator>jim.richmond</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.pressthered.com/?p=341</guid>
		<description><![CDATA[If you want your table column to not wrap in ASP.Net, you can use the NoWrap property in the tag like so: &#60;td nowrap="nowrap"> content &#60;/td> This makes the code xhtml compliant and prevents warnings in the source view of designer in Visual Studio. Normally you could just specify a nowrap attribute by itself in [...]]]></description>
			<content:encoded><![CDATA[<p>If you want your table column to <strong>not wrap</strong> in ASP.Net, you can use the <strong>NoWrap</strong> property in the <TD> tag like so:</p>
<pre name="code" class="html">
&lt;td nowrap="nowrap">
 content
&lt;/td>
</pre>
<p>This makes the code xhtml compliant and prevents warnings in the source view of designer in Visual Studio. Normally you could just specify a nowrap attribute by itself in plain html. </p>
<p>Or the CSS equivalent of setting nowrap:</p>
<pre name="code" class="html">
&lt;td style="white-space:nowrap;">
 content
&lt;/td>
</pre>
<p>Again, using the first option will prevent warnings in source view.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pressthered.com/nowrap_in_aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formatting Columns in an ASP.Net GridView Control</title>
		<link>http://www.pressthered.com/formatting_columns_in_an_aspnet_gridview_control/</link>
		<comments>http://www.pressthered.com/formatting_columns_in_an_aspnet_gridview_control/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 18:08:29 +0000</pubDate>
		<dc:creator>jim.richmond</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.pressthered.com/?p=309</guid>
		<description><![CDATA[To format columns in a GridView control, you can use the FormatString property: //Formatting Currency &#60;asp:GridView id="grid" Runat="Server" > &#60;Columns> &#60;asp:BoundField HeaderText="Amount" DataField="amt" FormatString="{0:c}"/> &#60;/Columns> &#60;/asp:GridView> To format a Date column, you must also set the HTMLEncode property to &#8220;False&#8221;. //Formatting a date column &#60;asp:BoundField HeaderText="Amount" DataField="date1" FormatString="{0:d}" HTMLEncode="False" /> To format a Currency with [...]]]></description>
			<content:encoded><![CDATA[<p>To format columns in a GridView control, you can use the <strong>FormatString</strong> property:</p>
<pre name="code" class="csharp">
//Formatting Currency
&lt;asp:GridView id="grid" Runat="Server" >
&lt;Columns>
        &lt;asp:BoundField HeaderText="Amount" DataField="amt"
         FormatString="{0:c}"/>
&lt;/Columns>
&lt;/asp:GridView>
</pre>
<p>To format a Date column, you must also set the <strong>HTMLEncode</strong> property to &#8220;False&#8221;.</p>
<pre name="code" class="csharp">
//Formatting a date column
&lt;asp:BoundField HeaderText="Amount" DataField="date1"
 FormatString="{0:d}" HTMLEncode="False" />
</pre>
<p>To format a Currency with no cents:</p>
<pre name="code" class="csharp">
//No cents in the currency
&lt;asp:BoundField HeaderText="Amount" DataField="amt"
 FormatString="{0:$#,0}" />
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.pressthered.com/formatting_columns_in_an_aspnet_gridview_control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slow Web Service calls to LocalHost in ASP.NET</title>
		<link>http://www.pressthered.com/slow_web_service_calls_to_localhost_in_aspnet/</link>
		<comments>http://www.pressthered.com/slow_web_service_calls_to_localhost_in_aspnet/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 06:13:37 +0000</pubDate>
		<dc:creator>jim.richmond</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.pressingtheredbutton.com/?p=43</guid>
		<description><![CDATA[Here&#8217;s a few troubleshooting steps you can use to resolve slow calls to web services that are on your local host. 1. When I googled this issue, I found this link. It reveals a setting you can make in your web.config to force all calls to local web services to bypass your proxy (if you [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a few troubleshooting steps you can use to resolve slow calls to web services that are on your local host.</p>
<p>1. When I googled this issue, I found <a href="http://www.west-wind.com/WebLog/posts/3871.aspx">this link</a>. It reveals a setting you can make in your web.config to force all calls to local web services to bypass your proxy (if you have one). While I did have an internet proxy server, my local calls were not using it. You can validate this by first checking that your web service instance is using a proxy and your .asmx address is set to bypass the proxy (using <a href="http://msdn.microsoft.com/en-us/library/system.net.webproxy.isbypassed.aspx">WebProxy.IsBypassed</a>).</p>
<p>2. What ended up being my problem is that I had Windows Authentication set on my web service virtual directory. This isn&#8217;t the default but it got set at some point. The problem was that the first call to the web service got an access denied error (401) and the second call would go through fine (I assume by trying default credentials). So the delay was in the 401 error. One error isn&#8217;t really noticeable, but string together 5 or 10 calls on one page and the delay is unbearable. For reference, the log files revealed the 401 errors and the multiple calls.</p>
<p>If you want to go a step further (and you are bored), you can <a href="http://support.microsoft.com/kb/907273">troubleshoot the 401 errors</a> in your iis log files.</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pressthered.com/slow_web_service_calls_to_localhost_in_aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reviving Metabuilder&#8217;s DualList</title>
		<link>http://www.pressthered.com/reviving_metabuilders_duallist/</link>
		<comments>http://www.pressthered.com/reviving_metabuilders_duallist/#comments</comments>
		<pubDate>Sun, 06 May 2007 05:37:00 +0000</pubDate>
		<dc:creator>jim.richmond</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Metabuilder]]></category>

		<guid isPermaLink="false">http://www.pressingtheredbutton.com/reviving_metabuilders_duallist/</guid>
		<description><![CDATA[Update: Metabuilders.com updated their controls for Net 2.0! Metabuilders had a free ASP.Net web control (with source) called DualList (or DynamicListBox) that worked really well in ASP.Net 1.1. I wanted to use it in 2.0 but there are some minor fixes needed in the code. Here is summary of the fixes I found here and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Metabuilders.com updated their controls for Net 2.0!</strong></p>
<p><a href="http://www.metabuilders.com">Metabuilders</a> had a free ASP.Net web control (with source) called DualList (or DynamicListBox) that worked really well in ASP.Net 1.1. I wanted to use it in 2.0 but there are some minor fixes needed in the code. Here is summary of the fixes I found <a href="http://www.codecomments.com/message699906.html">here</a> and <a href="http://geekswithblogs.net/mnf/archive/2006/09/20/91647.aspx">here</a>. </p>
<p>Combining this control with <a href="http://www.telerik.com">Telerik</a>&#8216;s AjaxManager is slick.</p>
<p><strong>Steps to Convert DualList to ASP.Net 2.0</strong></p>
<ol>
<li>
First download the source from the metabuilders web site. Open the solution in VS 2005 and it will start the conversion wizard. When it asks about not finding the source code bindings, choose to remove them.
</li>
<li>
Once the conversion is finished, the project will not compile. Open the <strong>AssemblyInfo.cs</strong> file and REMOVE:</p>
<p>[assembly: AssemblyDelaySign(false)]<br />
[assembly: AssemblyKeyFile("")]<br />
[assembly: AssemblyKeyName("metabuilders.com")]
</li>
<li>
Now open <strong>DynamicListBoxResourceHandler.cs</strong>, REPLACE:</p>
<p>if ( context.Cache[cacheKey] == null ) {<br />
	context.Cache.Insert(cacheKey, DetermineIsRegistered());<br />
}<br />
return (Boolean)context.Cache[cacheKey];</p>
<p>WITH:</p>
<p>bool bRet=false;<br />
//fixed cache delay, do not rely on cache available immediately after insert<br />
if (context.Cache[cacheKey] == null)<br />
{<br />
    bRet = DetermineIsRegistered();<br />
    context.Cache.Insert(cacheKey, bRet);<br />
}</p>
<p>else</p>
<p>    bRet = (Boolean)context.Cache[cacheKey];</p>
<p>return bRet;</p>
</li>
<li>
In <strong>DynamicListBoxResourceHandler.cs</strong> again, REPLACE:</p>
<p>Object handlerMap = System.Web.HttpContext.GetAppConfig(&#8220;system.web/httpHandlers&#8221;);</p>
<p>WITH:</p>
<p>Object handlerMap = System.Web.HttpContext.GetAppConfig(&#8220;httpHandlers&#8221;);</p>
</li>
<li>
Finally, in <strong>DynamicListBox.js</strong>, REPLACE:</p>
<p>list.Tracker = DynamicListBox_FindControl( list.name + &#8220;:itemTracker&#8221; );</p>
<p>WITH:</p>
<p>list.Tracker = DynamicListBox_FindControl( list.name + &#8220;$itemTracker&#8221; );</p>
</li>
</ol>
<p>You should be all set then.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pressthered.com/reviving_metabuilders_duallist/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

