<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Code Samples</title><link>http://blogs.crsw.com/mark/category/72.aspx</link><description>Code Samples</description><managingEditor>Mark H. Wagner</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Mark H. Wagner</dc:creator><title>How to send SMTP email using Telnet</title><link>http://blogs.crsw.com/mark/archive/2006/07/06/2032.aspx</link><pubDate>Thu, 06 Jul 2006 11:08:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2006/07/06/2032.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/2032.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2006/07/06/2032.aspx#Feedback</comments><slash:comments>66</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/2032.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/2032.aspx</trackback:ping><description>&lt;P&gt;&lt;STRONG&gt;How to send SMTP email using Telnet&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is an old method of sending email using Telnet.&amp;nbsp; I've posted it here mostly for a remider to me on exactly how to do this, but thought I would share it with others who may not know of this.&amp;nbsp; This can be useful when testing if a server can successfully send email.&amp;nbsp; For example, I use this to confirm if a SharePoint server can successfully send emails for alerts and notifications.&lt;/P&gt;
&lt;P&gt;The items in &lt;STRONG&gt;bold&lt;/STRONG&gt; are what you should type.&lt;/P&gt;
&lt;P&gt;Start a Telnet session from a command line by entering:&lt;BR&gt;&lt;STRONG&gt;Telnet your.mailserver.com 25&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;220 a.mail.server.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.2499 ready at&amp;nbsp; Thu, 29 Jun 2006 15:59:02 -0600&lt;BR&gt;&lt;STRONG&gt;helo&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;250 a.mail.server.com Hello [192.168.125.237]&lt;BR&gt;&lt;STRONG&gt;mail from: fromemail@server.com&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;250 2.1.0 &lt;A href="mailto:email@server.com...Sender"&gt;email@server.com...Sender&lt;/A&gt; OK&lt;BR&gt;&lt;STRONG&gt;rcpt to: joe@server.com&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;250 2.1.5 &lt;A href="mailto:joe@server.com"&gt;joe@server.com&lt;/A&gt;&lt;BR&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt;&lt;BR&gt;&lt;STRONG&gt;This is a test.&lt;BR&gt;&lt;/STRONG&gt;&lt;STRONG&gt;.&amp;nbsp; (enter a dot/period to end the data)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;250 2.6.0 &lt;A.MAIL.SERVER.COM&gt;Queued mail for delivery&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;quit&lt;BR&gt;&lt;/STRONG&gt;Connection to host lost.&lt;BR&gt;&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/2032.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Google Web Part for SharePoint</title><link>http://blogs.crsw.com/mark/archive/2005/06/08/992.aspx</link><pubDate>Wed, 08 Jun 2005 16:21:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/06/08/992.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/992.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/06/08/992.aspx#Feedback</comments><slash:comments>81</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/992.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/992.aspx</trackback:ping><description>&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;Google Search Web Part&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="" href="/mark" target=_blank&gt;&lt;FONT color=#000080&gt;Mark Wagner&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;A href="http://blogs.crsw.com/mark"&gt;http://blogs.crsw.com/mark&lt;/A&gt;&lt;BR&gt;June 10, 2005&lt;/P&gt;
&lt;P&gt;Article: &lt;A href="http://blogs.crsw.com/mark/articles/1009.aspx"&gt;http://blogs.crsw.com/mark/articles/1009.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I created a custom Google web part a few weeks ago for my demo SharePoint site.&amp;nbsp; You can see what it looks like on&amp;nbsp;my testing SharePoint&amp;nbsp;home page &lt;A href="http://sharepoint.crsw.com/" target=_blank&gt;http://sharepoint.crsw.com&lt;/A&gt;.&amp;nbsp; The Google web part submits a search request by navigating the user directly to the Google search web page and performs a Google search using the Google search engine.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I have since received a number of emails requesting to get this web part for use on their SharePoint sites, so I decided to make it available for others. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;SPAN&gt;First and foremost, the &lt;/SPAN&gt;&lt;/I&gt;&lt;I&gt;&lt;SPAN&gt;Google name and search service are the property of Google.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I have no affiliation with the Google name and its services. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/I&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Google is a must-have resource for my daily work.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If I need to find something, I Google it, and nothing else comes close when searching on the Internet.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;With this &lt;I&gt;dependency&lt;/I&gt;, I had to have it on my new SharePoint demo site.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;My SharePoint demo site is more of a test-harness at this point since it is hosted on a shared/public server, so don&amp;#8217;t be too disappointed when you&amp;nbsp;see it. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For those of you not familiar with Google, welcome to the Internet.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Google is the single best Internet search service available on the Internet, for the Internet.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If you need to find something on the Internet, Google will find it for you.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This process of searching is commonly referred to Googling.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If you &lt;I&gt;Google&lt;/I&gt; something, your are using Google to search the Internet for it.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;For the rest of you, Google is probably how you found this article. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is important to remember that this Google Search web part is not intended to replace the SharePoint search feature.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;In order for Google to find any results, Google must have already searched and indexed your site.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Also remember that Google will not be able to crawl and index pages on your SharePoint site that are not accessible to the public.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This is where the SharePoint search has the upper hand.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Again, this web part is not intended to replace the SharePoint search feature, but to conveniently access the much used Google search from your SharePoint page. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;SPAN&gt;Configuring the Google Search Web Part &lt;/SPAN&gt;&lt;/B&gt;
&lt;P&gt;&lt;SPAN&gt;Here is a picture of the web part configurations.&lt;/SPAN&gt; 
&lt;P&gt;&lt;IMG src="/mark/images/GoogleSearchWP-Config.jpeg" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;SPAN&gt;Google Image URL 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/B&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Once you have installed the web part, in the configuration options of the web part is a Google Image URL property which defaults to an image on Google&amp;#8217;s web site.&amp;nbsp; You should&amp;nbsp;use&amp;nbsp;the default url for the Google image.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I have made this property available just in case Google renames or moves their image. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This&amp;nbsp;Google Search Web Part can be configured in three distinct ways. 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;BR&gt;Standard Google Search&lt;/STRONG&gt; 
&lt;P&gt;&lt;IMG src="/mark/images/GoogleSearchWP.jpeg" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Local Site Search &lt;/STRONG&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;IMG src="/mark/images/GoogleSearchWP-Local.jpeg" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Custom Site Search&lt;/STRONG&gt; 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;IMG src="/mark/images/GoogleSearchWP-Custom.jpeg" border=0&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.crsw.com/mark/articles/1009.aspx"&gt;Complete article here...&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/992.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Send Email Link for IE</title><link>http://blogs.crsw.com/mark/archive/2005/04/07/835.aspx</link><pubDate>Thu, 07 Apr 2005 10:24:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/04/07/835.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/835.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/04/07/835.aspx#Feedback</comments><slash:comments>26</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/835.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/835.aspx</trackback:ping><description>&lt;P&gt;I try not to have any (OK, many) obsessions; however, one is my consumption for information.&amp;nbsp; Because of this I have to strictly monitor myself from deviating from my present task.&amp;nbsp; I am sometimes easily distracted.&lt;/P&gt;
&lt;P&gt;To help me remember about &amp;#8220;something I found interesting&amp;#8220;, I have a nice little custom link button labeled &amp;#8220;Send&amp;#8221; that&amp;nbsp;I use in my Internet Explorer browser to quickly send myself an email.&amp;nbsp; The email contains a subject and the link to the website in the body.&amp;nbsp; Yes, you can do this by clicking, File &amp;gt; Send &amp;gt; Link&amp;nbsp;by E-Mail,&amp;nbsp;but&amp;nbsp;this is to many clicks for me.&amp;nbsp;&amp;nbsp;Yes, I am impatient and have to work on this also.&lt;/P&gt;
&lt;P&gt;This works with &lt;STRONG&gt;one click&lt;/STRONG&gt; - much better.&amp;nbsp; Your Links toolbar needs to be turned on to easily access the buttons in IE.&amp;nbsp; I have my located immediately after the Address bar as shown here.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/mark/postfiles/sendbutton.jpeg"&gt;&lt;/P&gt;
&lt;P&gt;Simply paste the the following javascript code into the URL of the link properties.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;javascript:navigate('mailto:YOUR-EMAIL@HERE.COM?subject=LINK:%20'+escape(document.title)+'&amp;amp;BODY='+escape(location.href))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The only thing you need to customize is the YOUR-EMAIL@HERE.COM portion.&amp;nbsp; Here is a sample of the properties dialog.&lt;/P&gt;
&lt;P&gt;To create a link button you can drag the &amp;#8220;e&amp;#8220; icon in the address bar to the Link toobar.&amp;nbsp; To get the properties, right-mouse-click on a link you want to edit.&amp;nbsp; Here is a sample of the properties dialog.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/mark/postfiles/sendbuttonprops.jpeg"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Warning:&lt;/STRONG&gt; For me these emails are subtle &amp;#8220;tasks&amp;#8221; to learn more.&amp;nbsp; Your inbox may quickly fill up. :)&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/835.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Convert a string to an enumerated (enum) value</title><link>http://blogs.crsw.com/mark/archive/2005/04/07/832.aspx</link><pubDate>Thu, 07 Apr 2005 08:12:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/04/07/832.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/832.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/04/07/832.aspx#Feedback</comments><slash:comments>39</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/832.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/832.aspx</trackback:ping><description>&lt;P&gt;Convert a string to an enumerated (enum) value.&lt;/P&gt;
&lt;P&gt;Using the Enum.Parse method, you can easily convert a string value to an enumerated value.  Doing this requires the type of the enum and string value.  Adding the &lt;EM&gt;true&lt;/EM&gt; argument will cause the case to be ignored.&lt;/P&gt;
&lt;P&gt;Using the following enum for this example:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;private enum Aircraft&lt;BR&gt;{&lt;BR&gt;   Beech,&lt;BR&gt;   Cessna,&lt;BR&gt;   Piper&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You can easily convert the string to an enum value like this:&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;Aircraft air = (Aircraft) Enum.Parse(typeof(Aircraft), "Cessna", true); &lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Ideally you should wrap a try-catch around the Enum.Parse statement.&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/832.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>String Date Validator</title><link>http://blogs.crsw.com/mark/archive/2005/04/06/829.aspx</link><pubDate>Wed, 06 Apr 2005 20:19:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/04/06/829.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/829.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/04/06/829.aspx#Feedback</comments><slash:comments>36</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/829.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/829.aspx</trackback:ping><description>&lt;P&gt;Simple string date validator.&lt;/P&gt;
&lt;P&gt;I am a big fan of maintaining a library of simple and clean helper methods.  Here is a simple and clean way to verify if a string formatted date is a valid date.  This allows you to encapsulate the exception handling making it easy to use and very readable - another important coding practice.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;private static bool IsDate(string sDate) &lt;BR&gt;{&lt;BR&gt;    DateTime dt;&lt;BR&gt;    bool isDate = true;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;    try&lt;BR&gt;    {&lt;BR&gt;        dt = DateTime.Parse(sDate); &lt;BR&gt;    }&lt;BR&gt;    catch&lt;BR&gt;    {&lt;BR&gt;        isDate = false;&lt;BR&gt;    }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;    return isDate;&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/829.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>What is your (assembly's) native tongue?</title><link>http://blogs.crsw.com/mark/archive/2005/04/06/828.aspx</link><pubDate>Wed, 06 Apr 2005 20:05:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/04/06/828.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/828.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/04/06/828.aspx#Feedback</comments><slash:comments>17</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/828.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/828.aspx</trackback:ping><description>&lt;P&gt;Per an MSDN TV episode (&lt;A href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20040826netaa/manifest.xml" target=_blank&gt;Using Managed Resources&lt;/A&gt;) - to improve the performance (albeit minimal - I expect) of your&amp;nbsp;assemblies, you should include the following line in your assemblyinfo.cs&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#006400&gt;[assembly: NeutralResourcesLanguageAttribute("en-US")]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;This defines the default&amp;nbsp;language for your assembly.&amp;nbsp; This allows the .NET runtime to bypass the process of looking for a satellite assembly for the &amp;#8220;en-US&amp;#8221; (default) language if the current culture matches the assemblies default culture.&amp;nbsp; Of course, assemblies intended for other languages should define&amp;nbsp;that&amp;nbsp;language as the default&amp;nbsp;language.&lt;/P&gt;
&lt;P&gt;Also, if you can put your satelite assemblies in the Global Assembly Cache (GAC), the Common Language Runtime (CLR) will load the assembly faster by not having to verify the cryptographic assembly signature.&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/828.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Trace.axd - The more you learn, the less you know</title><link>http://blogs.crsw.com/mark/archive/2005/04/06/827.aspx</link><pubDate>Wed, 06 Apr 2005 15:08:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/04/06/827.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/827.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/04/06/827.aspx#Feedback</comments><slash:comments>16</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/827.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/827.aspx</trackback:ping><description>&lt;P&gt;The more you learn, the less you know.&lt;/P&gt;
&lt;P&gt;Trying to keep up with the extensive areas of .NET and Microsoft products can easily bring you to this conclusion.  Its easy for us to continually focus on all the new technologies and versions (Whidbey and the .NET Framework 2.0) only to overlook some of the low hanging fruit - at least for me it is.  Remember, this is the &amp;#8220;Simple Thoughts from a Simple Mind&amp;#8220; blog. ;)&lt;/P&gt;
&lt;P&gt;One area I forgot about is the ASP.NET Trace - Trace.axd page.  As you may know, ASP.NET allows you to trace the processing for a single page or for all pages.  The trace output can be rendered at the end of each page.  Don't forget (as I did) there is also the Trace.axd page that provides a nice list of traced pages such as this.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/Mark/PostFiles/Trace/TracePic1.jpeg"&gt; &lt;/P&gt;
&lt;P&gt;The web.config file needs only a small change to make this available.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/Mark/PostFiles/Trace/TracePic2.jpeg"&gt; &lt;/P&gt;
&lt;P&gt;Clicking on the View Details link for a page process will present you with the familiar trace detail.&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/827.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Excellent source of .NET code samples</title><link>http://blogs.crsw.com/mark/archive/2005/03/29/813.aspx</link><pubDate>Tue, 29 Mar 2005 13:28:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/03/29/813.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/813.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/03/29/813.aspx#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/813.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/813.aspx</trackback:ping><description>&lt;P&gt;&lt;A href="http://www.pluralsight.com/blogs/mike/"&gt;Mike Woodring&lt;/A&gt; has an excellent library of &lt;A href="http://www.bearcanyon.com/dotnet/"&gt;code samples&lt;/A&gt;.  The bonus is that each of these is well documented.  I recomend you take time to review these.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.bearcanyon.com/dotnet/"&gt;http://www.bearcanyon.com/dotnet/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/813.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>Building a Better Busy Box (Processing… Please Wait) - Ver 1.2</title><link>http://blogs.crsw.com/mark/archive/2005/02/16/737.aspx</link><pubDate>Wed, 16 Feb 2005 10:09:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/02/16/737.aspx</guid><description>&lt;P&gt;&lt;FONT size=5&gt;Building a Better Busy Box - Ver 1.2&lt;BR&gt;(Processing&amp;#8230; Please Wait)&lt;BR&gt;&lt;/FONT&gt;&lt;A title="" href="vid:/mark" target=_blank&gt;&lt;A title="" href="vid:/mark" target=_blank&gt;&lt;FONT color=#000080&gt;&lt;/A&gt;&lt;BR&gt;&lt;A title="" href="vid:/mark" target=_blank&gt;Mark Wagner&lt;/A&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/A&gt;&lt;BR&gt;Castle Rock Software, LLC&lt;BR&gt;&lt;A href="http://blogs.crsw.com/mark"&gt;&lt;FONT color=#000080&gt;http://blogs.crsw.com/mark&lt;/FONT&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;February 16, 2005 &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Updates&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;February 16, 2005 - Rewrite to use an IFRAME instead of a DIV tag. 
&lt;LI&gt;January 7, 2005 - Fixed z-Index attribute. 
&lt;LI&gt;November 13, 2004 - Original article&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Summary:&lt;/STRONG&gt; We often need to provide a user message informing the user that their request is &amp;#8220;processing&amp;#8221;.  Like the hour-glass mouse pointer lets the Windows user know the system is busy processing their last request, I have a simple, clean, and effect solution to providing this on web pages.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BusyBox Demo&lt;/STRONG&gt; &lt;BR&gt;&lt;/STRONG&gt;&lt;A href="http://blogs.crsw.com/mark/samples/BusyBoxDemo/Default.aspx" target=_blank&gt;&lt;FONT color=#000080&gt;http://blogs.crsw.com/mark/samples/BusyBoxDemo/Default.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Article source and sample code links&lt;BR&gt;&lt;/STRONG&gt;This article is located at: &lt;A href="http://blogs.crsw.com/mark/articles/642.aspx"&gt;http://blogs.crsw.com/mark/articles/642.aspx&lt;/A&gt;&lt;BR&gt;Source code sample at: &lt;A href="http://blogs.crsw.com/mark/files/BusyBox-1.2-Demo.zip"&gt;&lt;FONT color=#000080&gt;http://blogs.crsw.com/mark/files/BusyBox-1.2-Demo.zip&lt;/FONT&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Technologies employed&lt;/STRONG&gt; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;JavaScript 
&lt;LI&gt;HTML (ASP.NET)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Supported browsers&lt;/STRONG&gt;  &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Internet Explorer 6 
&lt;LI&gt;Netscape Navigator 7.1, 7.2 
&lt;LI&gt;Firefox 1.0 
&lt;LI&gt;No other browsers have been tested &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT size=5&gt;Introduction&lt;/FONT&gt; &lt;BR&gt;Anyone who has used the Internet for more than a few hours has encountered times when the &amp;#8220;Internet&amp;#8221; is being slow.  I use the term &amp;#8220;Internet&amp;#8221; in jest here since it is often the term used when websites are not responding as quickly as we would like.  As most of us know, the problem is more often caused by an over-worked website, one that is unable to handle its current workload.  This article does not address any performance issues as that is a much larger topic for another time.  However, for those well designed and well cared-for websites there are very acceptable times when displaying a &amp;#8220;processing&amp;#8221; message to the user is very helpful and very appropriate. &lt;/P&gt;
&lt;P&gt;I have certainly experienced times; as I am sure you have, where after clicking a submit or search button I began to wonder if the web server was going to process my request successfully.  Why shouldn&amp;#8217;t it.  I didn&amp;#8217;t expect it to take more than a second or two.  Performing functions like a search, report generation, or the processing of a large order, can often take more time than we would like.  These predictably slow responding places in an application are ideal candidates for user feedback in the form of a processing message.  As long as your website is not normally slow, your users will appreciate being notified of potentially long running processes. &lt;/P&gt;
&lt;P&gt;There are a number of different approaches to accomplishing this.  One of the more common methods is to navigate to an intermediate page where an animated image and/or message are presented to the user.  The intermediate page then immediately initiates the process of navigating to the long-processing page.  This allows the intermediate &amp;#8220;please wait&amp;#8221; page to be displayed to the user while the long-processing target page is crunching away.  When the target page completes its long process it then begins rendering to the user&amp;#8217;s browser, thus replacing the &amp;#8220;please wait&amp;#8221; message.  While this technique works well when navigating from page A to page B, it does not work well when a post-back (from page A to page A) is needed.  Additionally, having the benefits of things like ViewState become discarded. &lt;/P&gt;
&lt;P&gt;&lt;FONT size=5&gt;My Approach&lt;/FONT&gt; &lt;BR&gt;The approach I am about to cover functions just as well during a post-back as it does when navigating from page X to page Y.  Moreover, there is no need (or desire) to have an intermediate processing page.  If you are using a custom base page for your application; (i.e. a MasterPage), it becomes even easier to user.  I have added this to my personal CastlePage class making it very easy to use at anytime. &lt;/P&gt;
&lt;P&gt;My approach is to pre-load my busy box message in a hidden IFRAME &lt;EM&gt;&lt;/EM&gt;tag on any page that will navigate (or post-back) to a potentially long running process. After all, my busy box message has a pretty small code footprint. The page will begin it&amp;#8217;s unload process whenever the browser posts to a new page or performs a post-back. By placing JavaScript code in the &lt;EM&gt;onbeforeunload&lt;/EM&gt; event of the &lt;EM&gt;body&lt;/EM&gt; tag I can instantly reveal the busy box message to the user. Since this is part of the original page it will display immediately and remain visible until the new page completes its processing and begins to render in the user's browser. Best of all, this works great with post-backs too.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.crsw.com/mark/articles/642.aspx"&gt;Click here for the complete article.&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/737.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Mark H. Wagner</dc:creator><title>JavaScript ASP.NET Rater control (Rating control): Sneak Peek</title><link>http://blogs.crsw.com/mark/archive/2005/01/30/719.aspx</link><pubDate>Sun, 30 Jan 2005 17:15:00 GMT</pubDate><guid>http://blogs.crsw.com/mark/archive/2005/01/30/719.aspx</guid><wfw:comment>http://blogs.crsw.com/mark/comments/719.aspx</wfw:comment><comments>http://blogs.crsw.com/mark/archive/2005/01/30/719.aspx#Feedback</comments><slash:comments>55</slash:comments><wfw:commentRss>http://blogs.crsw.com/mark/comments/commentRss/719.aspx</wfw:commentRss><trackback:ping>http://blogs.crsw.com/mark/services/trackbacks/719.aspx</trackback:ping><description>&lt;P&gt;Rater Control, Rating Control, or 5-Star Rating Control, call it what you like.&lt;/P&gt;
&lt;P&gt;I have created a new JavaScript ASP.NET Rater control (Rating Control)&lt;STRONG&gt;.&lt;/STRONG&gt;&amp;nbsp; The entire functionality is driven by JavaScript, but I have also created an custom .NET control to facilitate easy use in an ASP.NET&amp;nbsp;web appication.&amp;nbsp;&amp;nbsp;I intend on&amp;nbsp;writing a much more detailed article,&amp;nbsp;soon I hope.&amp;nbsp; For now you can see my demo page for a better look.&lt;/P&gt;
&lt;P&gt;Technologies:&lt;BR&gt;JavaScript&lt;BR&gt;C#&lt;BR&gt;ASP.NET&lt;/P&gt;
&lt;P&gt;Here is a sneak peak at the Rater control in action: (Hint: use your mouse.)&lt;/P&gt;
&lt;P&gt;
&lt;SCRIPT language=javascript src="/mark/Samples/CastleRaterDemo/js/CastleRater.js"&gt;&lt;/SCRIPT&gt;

&lt;SCRIPT language=javascript&gt;
CastleRater.CreateJSControl("rater1", "http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOn.gif", "http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif", "http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOver.gif", 5, 0);
&lt;/SCRIPT&gt;
&lt;/P&gt;
&lt;P&gt;Demo: &lt;A href="http://blogs.crsw.com/mark/samples/CastleRaterDemo/" target=_blank&gt;http://blogs.crsw.com/mark/samples/CastleRaterDemo/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.crsw.com/mark/files/Castle.Web.Controls.RaterDemo.1.1.zip"&gt;&lt;IMG src="/mark/images/download.gif" border=0&gt;&lt;/A&gt;&amp;nbsp;&lt;A href="http://blogs.crsw.com/mark/files/Castle.Web.Controls.RaterDemo.1.1.zip"&gt;Download the demo (and control).&lt;/A&gt;&lt;BR&gt;&lt;A href="http://blogs.crsw.com/mark/files/Castle.Web.Controls.Rater.1.1.zip"&gt;&lt;IMG src="/mark/images/download.gif" border=0&gt;&amp;nbsp;Download the control only.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note: For anyone who would like to link to my&amp;nbsp;Rater control, please link to this post and not my demo page.&amp;nbsp; Thanks.&amp;nbsp; Also, I will make the C# source code for the .NET control available soon.&lt;/P&gt;&lt;img src ="http://blogs.crsw.com/mark/aggbug/719.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>