<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Asp.net Examples &#187; Uncategorized</title>
	<atom:link href="http://aspnetexamples.wordpress.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://aspnetexamples.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 06 Oct 2008 09:07:00 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='aspnetexamples.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/3ad1f13ab267f4691769d9511a55d9de?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Asp.net Examples &#187; Uncategorized</title>
		<link>http://aspnetexamples.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aspnetexamples.wordpress.com/osd.xml" title="Asp.net Examples" />
		<item>
		<title>Get Host by IP adress</title>
		<link>http://aspnetexamples.wordpress.com/2008/10/06/get-host-by-ip-adress/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/10/06/get-host-by-ip-adress/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 09:07:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/10/06/get-host-by-ip-adress/</guid>
		<description><![CDATA[Get Host by IP adress
&#160;string IPAdress = &#8220;127.0.0.1&#8243;;
IPHostEntry IPHostEntryObject = Dns.GetHostEntry(IPAdress);
Console.WriteLine(IPHostEntryObject.HostName)
Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=53&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1><span style="font-size:small;">Get Host by IP adress</span></h1>
<p><span style="background-color:#999999;font-size:x-small;display:block;">&nbsp;string IPAdress = &#8220;127.0.0.1&#8243;;<br />
IPHostEntry IPHostEntryObject = Dns.GetHostEntry(IPAdress);<br />
Console.WriteLine(IPHostEntryObject.HostName)</span></p>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=53&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/10/06/get-host-by-ip-adress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>Make C# Application Wait Amount of Time</title>
		<link>http://aspnetexamples.wordpress.com/2008/10/06/make-c-application-wait-amount-of-time/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/10/06/make-c-application-wait-amount-of-time/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 07:06:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/10/06/make-c-application-wait-amount-of-time/</guid>
		<description><![CDATA[Stalling for Time
 C#.Net programs sometimes need to wait a certain amount of time before carrying out the rest of the code. For example, an application that reminds users every 15 minutes to do something has to stall for 15 minutes.
While you can do time-measuring algorithms in C# with the Timer class, let&#8217;s try to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=52&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style23" style="font-size:18px;font-weight:bold;">Stalling for Time</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"> C#.Net programs sometimes need to wait a certain amount of time before carrying out the rest of the code. For example, an application that reminds users every 15 minutes to do something has to stall for 15 minutes.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">While you can do time-measuring algorithms in C# with the <span class="style36">Timer</span> class, let&#8217;s try to use a simpler way&#8230;</div>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style23" style="font-size:18px;font-weight:bold;">DateTime vs StopWatch</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">If you remember the code speed test utility, there are two C# classes (not including Timer) that can measure time, the <span class="style36">DateTime</span> class and the <span class="style36">System.Diagnostics.StopWatch</span> class.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">The <span class="style36">DateTime</span> class is good if you want to work with loose amounts of time, meaning that 14.98 seconds would be okay if you were aiming for 15.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">The <span class="style36">StopWatch</span> class on the other hand is as precise as you can get with only C# code.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Whichever one you use is up to you&#8230;</div>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style23" style="font-size:18px;font-weight:bold;">How to Stall for Time</span></h2>
<div class="style15">The basic way to stall for time in C# will be to use a <span class="style36">while</span> loop. In theory, we just need the loop to run in circles until enough time has passed. The example uses <span class="style36">DateTime</span>, but the <span class="style36">StopWatch</span> object would work too&#8230;</div>
<pre style="background-color:#999999;"><span class="style37">DateTime</span> start = <span class="style37">DateTime</span>.Now;

<span class="style38">while</span> (<span class="style37">DateTime</span>.Now.Subtract(start).Seconds &lt; 15)
{
}</pre>
<div class="style15">That source code will work, but it is not elegant just yet. The problem is it freezes the C# program until the 15 seconds are over. Even worse, it eats up the CPU attention.</div>
<div class="style15">To keep the application responsive, you need to add the following C# line <em>inside </em>the loop:</div>
<pre style="background-color:#999999;"><span class="style37">Application</span>.DoEvents();</pre>
<div class="style15">That makes the applicaiton process its messages even while the loop is running. Thus normal <a href="http://vckicks.110mb.com/angle_user_control.html" target="_blank">UI interaction</a> is kept running.</div>
<div class="style15">To prevent the CPU from going insane: </div>
<pre style="background-color:#999999;">System.Threading.<span class="style37">Thread</span>.Sleep(1);</pre>
<div class="style15">Technically that C# code can reduce how accurate the stalling time is, but giving the loop a 1 millisecond break per iteration, frees up the CPU.</div>
<div class="style15">Remember, both of those lines go <strong>inside the loop</strong>. And with that, you now have an elegant way to stall for time with simple C# code.</div>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=52&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/10/06/make-c-application-wait-amount-of-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimizing C# Application</title>
		<link>http://aspnetexamples.wordpress.com/2008/10/06/optimizing-c-application/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/10/06/optimizing-c-application/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 06:58:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/10/06/optimizing-c-application/</guid>
		<description><![CDATA[Optimizing C# Application
7 Ways To Optimize C# Code
 Code optimization is an important aspect of writing an efficient C# application. The following tips will help you increase the speed and efficiency of your C# code and applications.

1. Knowing when to use StringBuilder
You must have heard before that a StringBuilder object is much faster at appending [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=51&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1 align="center" style="font-family:Arial,Helvetica,sans-serif;font-size:19px;"><span style="color:#cc0000;font-size:24px;">Optimizing C# Application</span></h1>
<h2 style="color:orange;"><span class="style23" style="font-size:18px;font-weight:bold;">7 Ways To Optimize C# Code</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"> Code optimization is an important aspect of writing an efficient C# application. The following tips will help you increase the speed and efficiency of your C# code and applications.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<h2 style="color:orange;"><span class="style23" style="font-size:18px;font-weight:bold;">1. Knowing when to use StringBuilder</span></h2>
<div class="style15">You must have heard before that a StringBuilder object is much faster at appending strings together than normal string types.</div>
<div class="style15">The thing is <span class="style33">StringBuilder</span> is faster mostly with <strong>big</strong> strings. This means if you have a loop that will add to a single string for many iterations then a <span class="style33">StringBuilder</span> class is definitely much faster than a <span class="style33">string</span> type.</div>
<div class="style15"> However if you just want to append something to a string a single time then a <span class="style33">StringBuilder</span> class is overkill. A simple <span class="style33">string</span> type variable in this case improves on resources use and readability of the C# source code.</div>
<div class="style15">Simply choosing correctly between <span class="style33">StringBuilder</span> objects and string types you can optimize your code.</div>
<div class="style15"></div>
<h2 style="color:orange;"><span class="style23" style="font-size:18px;font-weight:bold;">2. Comparing Non-Case-Sensitive Strings</span></h2>
<div class="style15">In an application sometimes it is necessary to compare two string variables, ignoring the cases. The tempting and traditionally approach is to convert both strings to all lower case or all upper case and then compare them, like such:</div>
<div class="style15"></div>
<pre style="background-color:#999999;">str1.ToLower() == str2.ToLower()</pre>
<div class="style15"></div>
<div class="style15">However repetitively calling the function <span class="style33">ToLower()</span> is a bottleneck in performace. By instead using the built-in <span class="style33">string.Compare() </span>function you can increase the speed of your applications.</div>
<div class="style15">To check if two strings are equal ignoring case would look like this:</div>
<div class="style15"></div>
<pre style="background-color:#999999;"><span class="style28">string</span>.Compare(str1, str2, <span class="style28">true</span>) == 0 <span class="style27">//Ignoring cases</span></pre>
<pre><span class="style27">&nbsp;</span></pre>
<div class="style15">The C# <span class="style33">string.Compare</span> function returns an integer that is equal to 0 when the two strings are equal.</div>
<h2 class="style15" style="color:orange;"><span class="style23" style="font-size:18px;">3. Use string.Empty</span></h2>
<div class="style15">This is not so much a performance improvement as it is a readability improvement, but it still counts as code optimization. Try to replace lines like:</div>
<div class="style15"></div>
<pre style="background-color:#999999;"><span class="style28">if</span> (str == <span class="style29">""</span>)</pre>
<div class="style15">with:</div>
<pre style="background-color:#666666;"><span class="style28">if</span> (str == <span class="style28">string</span>.Empty)</pre>
<pre>&nbsp;</pre>
<div class="style15">This is simply  better programming practice and has no negative impact on performance.</div>
<div class="style15">Note, there is a popular practice that checking a string&#8217;s length to be 0 is faster than comparing it to an empty string. While that might have been true once it is no longer a significant performance improvement. Instead stick with <span class="style33">string.Empty</span>.</div>
<h2 class="style15" style="color:orange;"><span class="style23" style="font-size:18px;">4. Replace ArrayList with List&lt;&gt;</span></h2>
<div class="style15"><span class="style33">ArrayList</span> are useful when storing multiple types of objects within the same list. However if you are keeping the same type of variables in one <span class="style33">ArrayList</span>, you can gain a performance boost by using <span class="style33">List&lt;&gt;</span> objects instead.</div>
<div class="style15">Take the following ArrayList:</div>
<div class="style15"></div>
<pre style="background-color:#999999;"><span class="style26"><span class="style31">ArrayList</span> intList = <span class="style28">new</span> <span class="style31">ArrayList</span>();
intList.add(10);
<span class="style28">return</span> (<span class="style28">int</span>)intList[0] + 20;</span></pre>
<pre><span class="style26">&nbsp;</span></pre>
<div class="style15">Notice it only contains intergers. Using the <span class="style33">List&lt;&gt;</span> class is a lot better. To convert it to a typed <span class="style33">List</span>, only the variable types need to be changed:</div>
<div class="style15"></div>
<pre style="background-color:#999999;"><span class="style26"><span class="style31">List</span>&lt;<span class="style28">int</span>&gt; intList = <span class="style28">new</span> <span class="style31">List</span>&lt;<span class="style28">int</span>&gt;();

intList.add(10)

<span class="style28">return</span> intList[0] + 20;</span></pre>
<div class="style15">There is no need to cast types with <span class="style33">List&lt;&gt;</span>. The performance increase can be especially significant with primitive data types like integers.</div>
<h2 style="color:orange;"><span class="style23" style="font-size:18px;">5. Use &amp;&amp; and || operators</span></h2>
<div class="style15">When building if statements, simply make sure to use the double-and notation (<span class="style33">&amp;&amp;</span>) and/or the double-or notation (<span class="style33">||</span>), (in Visual Basic they are <span class="style33">AndAlso</span> and <span class="style33">OrElse</span>).</div>
<div class="style15">If statements that use &amp; and | must check every part of the statement and then apply the &#8220;and&#8221; or &#8220;or&#8221;. On the other hand, <span class="style33">&amp;&amp;</span> and <span class="style33">||</span> go thourgh the statements one at a time and stop as soon as the condition has either been met or not met.</div>
<div class="style15">Executing less code is always a performace benefit but it also can avoid run-time errors, consider the following C# code:</div>
<div class="style15"></div>
<pre style="background-color:#999999;color:black;"><span class="style28">if</span> (object1 != <span class="style28">null</span> &amp;&amp; object1.runMethod())</pre>
<pre>&nbsp;</pre>
<div class="style15">If <span class="style33">object1</span> is null, with the <span class="style33">&amp;&amp;</span> operator, <span class="style33">object1.runMethod()</span>will not execute. If the <span class="style33">&amp;&amp;</span> operator is replaced with <span class="style33">&amp;</span>, <span class="style33">object1.runMethod(</span><span class="style24">)</span> will run even if <span class="style33">object1</span> is already known to be null, causing an exception.</div>
<h2 class="style15" style="color:orange;"><span class="style23" style="font-size:18px;">6. Smart Try-Catch</span></h2>
<div class="style15"><span class="style33">Try-Catch</span> statements are meant to catch exceptions that are beyond the programmers control, such as connecting to the web or a device for example. Using a <span class="style33">try</span> statement to keep code &#8220;simple&#8221; instead of using <span class="style33">if</span> statements to avoid error-prone calls makes code <em>incredibly </em>slower. Restructure your source code to require less <span class="style33">try</span> statements.</div>
<h2 class="style15" style="color:orange;"><span class="style23" style="font-size:18px;">7. Replace Divisions</span></h2>
<div class="style15">C# is relatively slow when it comes to division operations. One alternative is to replace divisions with a multiplication-shift operation to further <a href="http://www.codeproject.com/KB/cs/FindMulShift.aspx" target="_blank">optimize C#</a>. The article explains in detail how to make the conversion.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<h1 align="center" style="font-family:Arial,Helvetica,sans-serif;font-size:19px;"><span style="color:#cc0000;font-size:24px;">&nbsp;</span></h1>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=51&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/10/06/optimizing-c-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Unique Hardware ID</title>
		<link>http://aspnetexamples.wordpress.com/2008/10/06/c-unique-hardware-id/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/10/06/c-unique-hardware-id/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 06:55:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/10/06/c-unique-hardware-id/</guid>
		<description><![CDATA[C# Unique Hardware ID
Obtaining the Computer&#8217;s Unique ID
Each computer has certain hardware pieces that carry serial numbers. Using these serial numbers it is possible to obtain a hardware ID in C# that is unique to a certain computer only.

Keep in mind there are some serial numbers that are not true hardware serials, as in they [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=50&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1 align="center" style="font-family:Arial,Helvetica,sans-serif;font-size:19px;"><span style="color:#cc0000;font-size:24px;">C# Unique Hardware ID</span></h1>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style30" style="font-size:18px;font-weight:bold;">Obtaining the Computer&#8217;s Unique ID</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Each computer has certain hardware pieces that carry serial numbers. Using these serial numbers it is possible to <strong>obtain a hardware ID in C#</strong> that is unique to a certain computer only.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Keep in mind there are some serial numbers that are not true hardware serials, as in they change when the harddrive is formatted.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"> We are going to use the first CPU&#8217;s ID and the first Harddrive&#8217;s actual serial, neither of which change upon formatting. Using C# code, you can combine those serials into a unique hardware ID</div>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style30" style="font-size:18px;font-weight:bold;">Hardware IDs</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Both ID&#8217;s will require the <span class="style31">System.Management.dll</span> reference. If you create a New Project the reference will not be added automatically.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Add it manually by right-clicking on &#8220;References&#8221; (in the Solution Explorer) and hit &#8220;Add Reference&#8230;&#8221;. Scroll down to System.Management (in the .Net tab) and add it&#8230;</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style17 style19"><span class="style30">CPU ID</span></span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Note that finding the CPU unique hardware ID is a bit different than normal C# programming. We&#8217;ll be accessing the property through string expressions rather than strong-typed properties.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<pre style="background-color:#999999;"><span class="style19">string</span> cpuInfo = <span class="style19">string</span><span class="style18">.Empty</span>;
<span class="style27">ManagementClass</span> mc = <span class="style19">new</span> <span class="style25">ManagementClass</span>(<span class="style18 style32">"win32_processor"</span>);
<span class="style25">ManagementObjectCollection</span> moc = mc.GetInstances();

<span class="style19">foreach</span> (<span class="style25">ManagementObject</span> mo <span class="style19">in</span> moc)
{
     <span class="style28">if</span> (cpuInfo == <span class="style18">""</span>)
     {
          <span class="style29">//Get only the first CPU's ID</span>
          cpuInfo = mo.Properties[<span class="style18 style32">"processorID"</span>].Value.ToString();
          <span class="style19">break</span>;
     }
}
<span class="style19">return</span> cpuInfo;</pre>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">The function runs with a bit of a delay, but nothing too terrible.</div>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style30" style="font-size:18px;font-weight:bold;">Hard Drive ID (Volume Serial)</span></h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">Finding a unique volume serial works very similarly and luckily a bit simplier:</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<pre style="background-color:#999999;"><span class="style23 style25">ManagementObject</span> dsk = <span class="style19">new</span> <span class="style25">ManagementObject</span>(<span class="style15 style18"><span class="style18"><span class="style32">@</span></span></span><span class="style31">"win32_logicaldisk.deviceid=""" + drive + @":"""</span>);
dsk.Get();
<span class="style19">string</span> volumeSerial = dsk[<span class="style31">"<span class="style18">VolumeSerialNumber</span>"</span>].ToString();</pre>
<h2 style="color:orange;font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style30" style="font-size:18px;font-weight:bold;">Deriving a Unique ID</span>                         </h2>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">The two serials can be combined in any way you wish. Use simple C# string functions or complex one. For example, after testing it across several systems, I decided to truncated serveral 0&#8217;s from the Volume Serial.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;">A quick note. What is the point of a unique hardware ID? The most common use for such information is for licensing software that is tailored to a specific computer of set of computers. With a bit of C# encryption functions, it can be an effective method.</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span class="style16">Download the C# project files to see for yourself the speed of the combined functions and the complexity of the <strong>serial number</strong>.</span>..</div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"></div>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:13px;"><span style="color:#cc0000;font-size:24px;"></span></div>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=50&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/10/06/c-unique-hardware-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>Upload a file only using browse button</title>
		<link>http://aspnetexamples.wordpress.com/2008/09/24/upload-a-file-only-using-browse-button/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/09/24/upload-a-file-only-using-browse-button/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:56:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/09/24/upload-a-file-only-using-browse-button/</guid>
		<description><![CDATA[Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=49&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=49&subd=aspnetexamples&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/09/24/upload-a-file-only-using-browse-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>Website ScreenShot ( Website Thumbnail)</title>
		<link>http://aspnetexamples.wordpress.com/2008/09/17/website-screenshot-website-thumbnail/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/09/17/website-screenshot-website-thumbnail/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 10:33:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/09/17/website-screenshot-website-thumbnail/</guid>
		<description><![CDATA[using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;
using System.Threading;
using System.Windows.Forms;
public partial class snapshot : System.Web.UI.Page
{
&#160;&#160; &#160;protected void Page_Load(object sender, EventArgs e)
&#160;&#160; &#160;{
&#160;&#160; &#160; &#160; &#160;string url = ((string.IsNullOrEmpty(Request.Params["site"])) ? &#8220;www.microsoft.com&#8221;:Request.Params["site"]);
&#160;&#160; &#160; &#160; &#160;int width = ((string.IsNullOrEmpty(Request.Params["width"])) ? 200 : int.Parse(Request.Params["width"]));
&#160;&#160; &#160; &#160; &#160;int height = ((string.IsNullOrEmpty(Request.Params["height"])) ? 140 : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=47&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Windows.Forms;<br />
using System.Drawing;<br />
using System.Drawing.Imaging;<br />
using System.Threading;<br />
using System.Windows.Forms;</p>
<p>public partial class snapshot : System.Web.UI.Page<br />
{<br />
&nbsp;&nbsp; &nbsp;protected void Page_Load(object sender, EventArgs e)<br />
&nbsp;&nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;string url = ((string.IsNullOrEmpty(Request.Params["site"])) ? &#8220;www.microsoft.com&#8221;:Request.Params["site"]);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int width = ((string.IsNullOrEmpty(Request.Params["width"])) ? 200 : int.Parse(Request.Params["width"]));<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int height = ((string.IsNullOrEmpty(Request.Params["height"])) ? 140 : int.Parse(Request.Params["height"]));<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int capWidth = ((string.IsNullOrEmpty(Request.Params["capWidth"])) ? 1024 : int.Parse(Request.Params["capWidth"]));<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int capHeight = ((string.IsNullOrEmpty(Request.Params["capHeight"])) ? 768 : int.Parse(Request.Params["capHeight"]));<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;bool fullHeight = ((string.IsNullOrEmpty(Request.Params["fullHeight"])) ? true : bool.Parse(Request.Params["fullHeight"]));<br />
&nbsp;&nbsp; &nbsp; &nbsp; <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;string address = &#8220;http://&#8221; + url.Replace(&#8220;hhtp://&#8221;,&#8221;");<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Bitmap thumbnail = WebsiteThumbnailImageGenerator.GetWebSiteThumbnail(address, capWidth, capHeight, width, height,fullHeight);<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Response.ContentType = &#8220;image/jpeg&#8221;;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;thumbnail.Save (Response.OutputStream, ImageFormat.Jpeg);<br />
&nbsp;&nbsp; &nbsp;}<br />
}</p>
<p>public class WebsiteThumbnailImageGenerator<br />
{<br />
&nbsp;&nbsp; &nbsp;public static Bitmap GetWebSiteThumbnail(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight, bool FullHeight)<br />
&nbsp;&nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;WebsiteThumbnailImage thumbnailGenerator = new WebsiteThumbnailImage(Url, BrowserWidth, BrowserHeight, ThumbnailWidth, ThumbnailHeight,FullHeight);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return thumbnailGenerator.GenerateWebSiteThumbnailImage();<br />
&nbsp;&nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp;private class WebsiteThumbnailImage<br />
&nbsp;&nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private WebBrowser _blankBrowser = null;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public WebsiteThumbnailImage(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight, bool FullHeight)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_Url = Url;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_BrowserWidth = BrowserWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_BrowserHeight = BrowserHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_ThumbnailHeight = ThumbnailHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_ThumbnailWidth = ThumbnailWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_fullHeight = FullHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//_blankBrowser = new WebBrowser();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private string m_Url = null;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public string Url<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_Url;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_Url = value;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private Bitmap m_Bitmap = null;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Bitmap ThumbnailImage<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_Bitmap;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private int m_ThumbnailWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int ThumbnailWidth<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_ThumbnailWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_ThumbnailWidth = value;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private int m_ThumbnailHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int ThumbnailHeight<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_ThumbnailHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_ThumbnailHeight = value;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private int m_BrowserWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int BrowserWidth<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_BrowserWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_BrowserWidth = value;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private int m_BrowserHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int BrowserHeight<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_BrowserHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_BrowserHeight = value;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private bool m_fullHeight;</p>
<p><span class="Apple-tab-span" style="white-space:pre;"> </span>public bool FullHeight<br />
<span class="Apple-tab-span" style="white-space:pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space:pre;">  </span>get { return m_fullHeight;}<br />
<span class="Apple-tab-span" style="white-space:pre;">  </span>set { m_fullHeight = value;}<br />
<span class="Apple-tab-span" style="white-space:pre;"> </span>}</p>
<p>
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Bitmap GenerateWebSiteThumbnailImage()<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thread m_thread = new Thread(new ThreadStart(_GenerateWebSiteThumbnailImage));<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_thread.SetApartmentState(ApartmentState.STA);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_thread.Start();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_thread.Join();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return m_Bitmap;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private void _GenerateWebSiteThumbnailImage()<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WebBrowser m_WebBrowser = new WebBrowser();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.ScrollBarsEnabled = false;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.Navigate(m_Url);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(WebBrowser_DocumentCompleted);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while (m_WebBrowser.ReadyState != WebBrowserReadyState.Complete)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Application.DoEvents();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.Dispose();<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WebBrowser m_WebBrowser = (WebBrowser)sender;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int _height = this.m_BrowserHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int _width = this.m_BrowserWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Size sz = m_WebBrowser.Size;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (this.FullHeight)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_height = m_WebBrowser.Document.Body.ScrollRectangle.Height;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_width = m_WebBrowser.Document.Body.ScrollRectangle.Width;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (_width &lt; this.BrowserWidth)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_width = this.BrowserWidth;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (_height &lt; sz.Height)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_height = sz.Height;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (_width != m_WebBrowser.Width)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.Size = new Size(_width, _height);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//_blankBrowser.Size = new Size(_width, _height);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.Refresh(WebBrowserRefreshOption.Completely);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (this.FullHeight)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_height = m_WebBrowser.Document.Body.ScrollRectangle.Height + SystemInformation.VerticalScrollBarWidth;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (_height &lt; sz.Height)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_height = sz.Height;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_Bitmap = new Bitmap(_width, _height);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_WebBrowser.DrawToBitmap(m_Bitmap, new Rectangle(m_WebBrowser.Location.X, m_WebBrowser.Location.Y, m_WebBrowser.Width, m_WebBrowser.Height));</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PrepareThumbNailSize(_height, _width);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_Bitmap = (Bitmap)m_Bitmap.GetThumbnailImage(m_ThumbnailWidth, m_ThumbnailHeight, null, IntPtr.Zero);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;private void PrepareThumbNailSize(int OriginalHeight, int OriginalWidth)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (this.FullHeight)<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double factor = Convert.ToDouble(OriginalHeight) / Convert.ToDouble(OriginalWidth);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double calc = Convert.ToDouble(this.m_ThumbnailWidth) * factor;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int thumbHeight = Convert.ToInt32(calc);<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.m_ThumbnailHeight = thumbHeight;<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;}<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=47&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/09/17/website-screenshot-website-thumbnail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://aspnetexamples.wordpress.com/2008/07/19/hello-world/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/07/19/hello-world/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 09:16:50 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=1&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Welcome to <a href="http://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=1&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/07/19/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
		<item>
		<title>DHTML ToolTip with Calendar Control</title>
		<link>http://aspnetexamples.wordpress.com/2008/03/25/dhtml-tooltip-with-calendar-control/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/03/25/dhtml-tooltip-with-calendar-control/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 04:58:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/03/25/dhtml-tooltip-with-calendar-control/</guid>
		<description><![CDATA[Introduction:
In one of my previous articles I talked about how you can effectively use DHTML with Asp.net to make cool tooltip. In this article I will show how you can use the same DHTML tooltip with the calendar control.    
Getting Started:
The first thing you need to do is to download the DHTML [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=30&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Introduction:</p>
<p>In one of my previous articles I talked about how you can effectively use DHTML with Asp.net to make cool tooltip. In this article I will show how you can use the same DHTML tooltip with the calendar control.    </p>
<p>Getting Started:</p>
<p>The first thing you need to do is to download the DHTML script from www.dynamicdrive.com. You can download the script from this url http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm. After download the script just place the required css in the head section of the page and the script in the body of the page.  </p>
<p>Screen shot of what we are going to do:</p>
<p>Here is a screen shot of what we are going to do in this article. As you can see that when you place your cursor over any date in the calendar it pops out the description in the DHTML box.</p>
<p><span style="color:Black;font-family:Verdana;font-size:12px;font-weight:normal;">
<p align="left"><span style="font-family:Verdana;font-size:85%;"><u><b>The Code:</b></u></span></p>
<p align="left"><span style="font-family:Verdana;font-size:85%;">The code is pretty simple. First  you need to pull all the information from the database to your dataset or any  other collection. </span></p>
<table style="border-collapse:collapse;color:#111111;" id="AutoNumber1" border="2" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="100%"><span style="font-size:85%;color:#0000ff;"><span style="font-family:Courier New;">     private</span></span><span style="font-family:Courier New;"><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">DataSet</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">      GetArticles()</span></span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">{</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">string</span><span style="font-size:85%;">      connectionString = </span><span style="font-size:85%;color:#800000;">@&#8221;Server=localhost;Database=GridViewGuy;Trusted_Connection=true&#8221;</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#008080;">     SqlConnection</span><span style="font-size:85%;"> myConnection = </span>     <span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">SqlConnection</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">(connectionString);</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#008080;">     SqlDataAdapter</span><span style="font-size:85%;"> ad = </span>     <span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">SqlDataAdapter</span><span style="font-size:85%;">(</span><span style="font-size:85%;color:#800000;">&#8220;SELECT      TOP 10 ArticleID,Title,Description,Abstract,DateCreated FROM Articles ORDER      BY DateCreated DESC&#8221;</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">,      myConnection);</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#008080;">DataSet</span><span style="font-size:85%;">      ds = </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">DataSet</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">();</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">ad.Fill(ds, </span></span>     <span style="font-family:Courier New;font-size:85%;color:#800000;">&#8220;Articles&#8221;</span><span style="font-size:85%;"><span style="font-family:Courier New;">);</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;font-size:85%;color:#0000ff;">return</span><span style="font-size:85%;"><span style="font-family:Courier New;">      ds; </span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">}</span></span></p>
</td>
</tr>
</tbody>
</table>
<p align="left"><span style="font-family:Verdana;font-size:85%;">Next to display this information  in the Calendar boxes you need to implement the Day_Render event of the Calendar  Control. </span></p>
<table style="border-collapse:collapse;color:#111111;" id="AutoNumber2" border="2" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="100%"><span style="font-size:85%;color:#0000ff;"><span style="font-family:Courier New;">     protected</span></span><span style="font-family:Courier New;"><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#0000ff;">void</span><span style="font-size:85%;">      Calendar1_DayRender(</span><span style="font-size:85%;color:#0000ff;">object</span><span style="font-size:85%;">      sender, </span><span style="font-size:85%;color:#008080;">DayRenderEventArgs</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">      e)</span></span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">{</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;font-size:85%;color:#008080;">DataSet</span><span style="font-size:85%;"><span style="font-family:Courier New;">      d = GetArticles();</span></span></p>
<p> <span style="font-size:85%;">    </span> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">foreach</span><span style="font-size:85%;">(</span><span style="font-size:85%;color:#008080;">DataRow</span><span style="font-size:85%;">      dr </span><span style="font-size:85%;color:#0000ff;">in</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">      d.Tables[0].Rows) {</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">string</span><span style="font-size:85%;">      dt = ((</span><span style="font-size:85%;color:#008080;">DateTime</span><span style="font-size:85%;">)      dr[</span><span style="font-size:85%;color:#800000;">"DateCreated"</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">]).ToShortDateString();</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;font-size:85%;color:#0000ff;">if</span><span style="font-size:85%;"><span style="font-family:Courier New;">      (dt == e.Day.Date.ToShortDateString())</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">{</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">e.Cell.Text = dr[</span></span><span style="font-family:Courier New;"><span style="font-size:85%;color:#800000;">"Title"</span><span style="font-size:85%;">]     </span><span style="font-size:85%;color:#0000ff;">as</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">String</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">} </span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">}</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;font-size:85%;color:#0000ff;">string</span><span style="font-size:85%;"><span style="font-family:Courier New;">      title = e.Cell.Text;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">string</span><span style="font-size:85%;">      ab = </span><span style="font-size:85%;color:#008080;">String</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">.Empty;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">foreach</span><span style="font-size:85%;">      (</span><span style="font-size:85%;color:#008080;">DataRow</span><span style="font-size:85%;"> dr     </span><span style="font-size:85%;color:#0000ff;">in</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">      d.Tables[0].Rows)</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">{</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">if</span><span style="font-size:85%;">      (title == dr[</span><span style="font-size:85%;color:#800000;">"Title"</span><span style="font-size:85%;">]     </span><span style="font-size:85%;color:#0000ff;">as</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">String</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">)</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">{</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">ab = dr[</span></span><span style="font-family:Courier New;"><span style="font-size:85%;color:#800000;">"Abstract"</span><span style="font-size:85%;">]     </span><span style="font-size:85%;color:#0000ff;">as</span><span style="font-size:85%;"> </span>     <span style="font-size:85%;color:#008080;">String</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">}</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">} </span></span></p>
<p> <span style="font-size:85%;">    </span> <span style="font-size:85%;">    </span>
<p><span style="font-family:Courier New;"><span style="font-size:85%;color:#0000ff;">string</span><span style="font-size:85%;">      dhtmlBox = </span><span style="font-size:85%;color:#800000;">&#8220;ddrivetip(&#8216;&#8221;</span><span style="font-size:85%;">      + ab + </span><span style="font-size:85%;color:#800000;">&#8220;&#8216;,&#8217;lightyellow&#8217;,'200&#8242;)&#8221;</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">e.Cell.Attributes[</span></span><span style="font-family:Courier New;font-size:85%;color:#800000;">"onmouseover"</span><span style="font-size:85%;"><span style="font-family:Courier New;">]      = dhtmlBox;</span></span></p>
<p> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">e.Cell.Attributes[</span></span><span style="font-family:Courier New;"><span style="font-size:85%;color:#800000;">"onmouseout"</span><span style="font-size:85%;">]      = </span><span style="font-size:85%;color:#800000;">&#8220;this.style.backgroundColor=&#8217;#C0C000&#8242;;&#8221;</span></span><span style="font-size:85%;"><span style="font-family:Courier New;">;</span></span></p>
<p> <span style="font-size:85%;">    </span> <span style="font-size:85%;">    </span>
<p><span style="font-size:85%;"><span style="font-family:Courier New;">}</span></span></p>
</td>
</tr>
</tbody>
</table>
<p align="left"><span style="font-family:Verdana;font-size:85%;">All I am doing is I fill the  Calendar cells using the e.Cell.Text property with the title of the article. And  since I got everything I need thing I need in the dataset I simply browse the  database for the particular description of the article and pops it up in the  DTHML tooltip. </span></p>
<p></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=30&subd=aspnetexamples&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/03/25/dhtml-tooltip-with-calendar-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>
	</item>
	</channel>
</rss>