<?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</title>
	<atom:link href="http://aspnetexamples.wordpress.com/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</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[<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" />]]></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[<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" />]]></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[<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" />]]></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[<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" />]]></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>Convert a string to Proper Case</title>
		<link>http://aspnetexamples.wordpress.com/2008/09/24/convert-a-string-to-proper-case/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/09/24/convert-a-string-to-proper-case/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:51:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[ASP.net]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/09/24/convert-a-string-to-proper-case/</guid>
		<description><![CDATA[Use the namespace System.Globalization 
VB.NET 











Dim myString As String = &#8220;syncFusion deVeloPer sUppOrt&#8221; 







&#8216; Creates a TextInfo based on the &#8220;en-US&#8221; culture. 







Dim TI As TextInfo = New CultureInfo(&#8220;en-US&#8221;, False).TextInfo 







Response.Write(TI.ToTitleCase(myString)) 

















  C# 















string myString = &#8220;syncFusion deVeloPer sUppOrt&#8221;; 







// Creates a TextInfo based on the &#8220;en-US&#8221; culture. 







TextInfo TI = new CultureInfo(&#8220;en-US&#8221;,false).TextInfo; 




Response.Write [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=48&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><div align="justify">Use the namespace System.Globalization <br />
VB.NET </div>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">Dim myString As String = &#8220;syncFusion deVeloPer sUppOrt&#8221; 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">&#8216; Creates a TextInfo based on the &#8220;en-US&#8221; culture. 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">Dim TI As TextInfo = New CultureInfo(&#8220;en-US&#8221;, False).TextInfo 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">Response.Write(TI.ToTitleCase(myString)) 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">
</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="0" id="AutoNumber2" style="border-collapse:collapse;width:630px;">
<tbody>
<tr>
<td>
<div align="justify">  C# </div>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">string myString = &#8220;syncFusion deVeloPer sUppOrt&#8221;; 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">// Creates a TextInfo based on the &#8220;en-US&#8221; culture. 
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:630px;">
<tbody>
<tr>
<td bgcolor="#dce4f6" valign="top" width="630">TextInfo TI = new CultureInfo(&#8220;en-US&#8221;,false).TextInfo; 
</td>
</tr>
</tbody>
</table>
<p>Response.Write (TI.ToTitleCase( myString ));</p>
Posted in ASP.net  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=48&subd=aspnetexamples&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/09/24/convert-a-string-to-proper-case/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[<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" />]]></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>Autocomplete Text Box using Ajax</title>
		<link>http://aspnetexamples.wordpress.com/2008/08/02/autocomplete-text-box-using-ajax/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/08/02/autocomplete-text-box-using-ajax/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 06:27:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/08/02/autocomplete-text-box-using-ajax/</guid>
		<description><![CDATA[
Example 1&#160;
Example 2&#160;
ASP.NET AJAX AutoComplete Control Demonstration
Google Suggest Style Filter with the AutoComplete Control&#160;
AutoCompleter Tutorial &#8211; jQuery(Ajax)/PHP/MySQL


       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=46&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><ol>
<li><a href="http://createwebapp.com/demo">Example 1</a>&nbsp;</li>
<li><a href="http://jquery.bassistance.de/autocomplete/demo/">Example 2</a>&nbsp;</li>
<li><a href="http://convincingemail.com/autosuggest-autocomplete.aspx">ASP.NET AJAX AutoComplete Control Demonstration</a></li>
<li><a href="http://mattberseth2.com/datatable_with_autocomplete_filter/">Google Suggest Style Filter with the AutoComplete Control</a>&nbsp;</li>
<li><a href="http://res.nodstrum.com/autoComplete/index.htm">AutoCompleter Tutorial &#8211; jQuery(Ajax)/PHP/MySQL</a>
</li>
</ol>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=46&subd=aspnetexamples&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/08/02/autocomplete-text-box-using-ajax/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>Password Strength meter</title>
		<link>http://aspnetexamples.wordpress.com/2008/08/02/password-strength-meter/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/08/02/password-strength-meter/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 06:19:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/08/02/password-strength-meter/</guid>
		<description><![CDATA[the password strength meters available on the web. Using prototype/scriptaculous, I stole some code from ZeBadger (thanks!) and created a new meter which dynamically changes while typing your password. 

Click here to see the demo
If you want to use this script, feel free to download the source and use it on your website.
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=45&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>the password strength meters available on the web. Using prototype/scriptaculous, I stole some code from <a href="http://www.geekwisdom.com/dyn/passwdmeter" target="_blank" title="Javascript Password Strength Meter">ZeBadger (thanks!)</a> and created a new meter which dynamically changes while typing your password. <br />
<img alt="Preview" border="1" height="28" src="http://ajaxorized.com/examples/scriptaculous/pastrength/screenie.jpg" title="Preview" width="330" /><br />
<a href="http://ajaxorized.com/examples/scriptaculous/pastrength/" title="Pastrength">Click here</a> to see the demo<br />
If you want to use this script, feel free to download the source and use it on your website.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=45&subd=aspnetexamples&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/08/02/password-strength-meter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>

		<media:content url="http://ajaxorized.com/examples/scriptaculous/pastrength/screenie.jpg" medium="image">
			<media:title type="html">Preview</media:title>
		</media:content>
	</item>
		<item>
		<title>Pretty Checkboxes &amp; Radiobutton</title>
		<link>http://aspnetexamples.wordpress.com/2008/08/02/pretty-checkboxes-radiobutton/</link>
		<comments>http://aspnetexamples.wordpress.com/2008/08/02/pretty-checkboxes-radiobutton/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 05:34:00 +0000</pubDate>
		<dc:creator>anandnat</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://aspnetexamples.wordpress.com/2008/08/02/pretty-checkboxes-radiobutton/</guid>
		<description><![CDATA[This script is for people who wants to have a consistent look for checkboxes across browser or those who simply want them to look better. By using this script you wont loose any of the regular inputs usability. If you have any comment/suggestion please post them in the main script post.
Demo
															Custom checkboxes 						Item 1 						 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=44&subd=aspnetexamples&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>This script is for people who wants to have a consistent look for checkboxes across browser or those who simply want them to look better. By using this script you wont loose any of the regular inputs usability. If you have any comment/suggestion please post them in the <a href="http://www.no-margin-for-errors.com/2008/07/28/prettycheckboxes-custom-checkbox-and-radio-buttons-solution/">main script post</a>.</p>
<h3>Demo</h3>
<div class="clearfix">															Custom checkboxes 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 1 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 2, this item is slightly longer to go on 2 lines. 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 3 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 4 						 					 						 																Custom radio buttons 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 1 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 2 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 3, this item is slightly longer to go on 2 lines. 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 4 						 					 						 																Inline radio buttons 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 1 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 2 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 3 						 			 						<span class="holderWrap" style="width:17px;height:17px;"><span class="holder" style="width:17px;"></span></span>Item 4 						 					</div>
<h3>Browser support</h3>
<p>This plugin has been tested and is known to work in the following browsers</p>
<ul class="checkmark">
<li>Firefox 3.0 (Mac/PC/Linux)</li>
<li>Firefox 2.0 (Mac/PC/Linux)</li>
<li>Opera 9.5 (Mac/PC)</li>
<li>Safari 3.1.1 (Mac)</li>
<li>Internet Explorer 6.0 (PC)</li>
<li>Internet Explorer 7.0 (PC)</li>
</ul>
<h3>Copyright</h3>
<p>This script is licensed under Creative Commons Attribution 2.5. So you can use it in all you projects even commercial ones. <a href="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/#donations">Donations</a> are always welcome.</p>
<h3>Download</h3>
<p><a href="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/prettyCheckboxes_uncompressed.zip">Uncompressed version <strong>(Script: 2.2kb)</strong></a><br />
<a href="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/prettyCheckboxes_compressed.zip">Compressed version <strong>(Script: 1.8kb)</strong></a></p>
<h3>Version history</h3>
<ul class="noBull">
<li class="current">1.0: Initial release of prettyCheckboxes.</li>
</ul>
<h3>How to use</h3>
<p>Nothing is easier to use. First include the jQuery library then include the prettyCheckboxes javascript in the head of the page(s) where you want to use prettyCheckboxes.<br />
<a href="http://docs.jquery.com/Downloading_jQuery" rel="external" target="_blank">jQuery can be download here</a><br />
<strong>IMPORTANT:</strong> For the script to work properly <strong>EVERY</strong> labels need to have a &#8220;<a href="http://www.w3.org/TR/html401/interact/forms.html#adef-for" rel="external" target="_blank">for</a>&#8221; attribute linking to the ID of their corresponding checkbox/radio</p>
<pre>				<code>

				</code>
			</pre>
<p>Then you need to initalize prettyCheckboxes.</p>
<pre>				<code>
$(document).ready(function(){
	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
});
				</code>
			</pre>
<p>If you want prettyComments to be initialized on specific inputs, you can specify which element by using a CSS selector, like so:</p>
<pre>				<code>
$(document).ready(function(){
	$('input.myCheckbox').prettyCheckboxes();
});
				</code>
			</pre>
<p>You can provide several parameters to the function if you want to customize it a bit further</p>
<pre>				<code>
$(document).ready(function(){
	$('input[type=checkbox],input[type=radio]').prettyCheckboxes({
		checkboxWidth: 17, // The width of your custom checkbox
		checkboxHeight: 17, // The height of your custom checkbox
		className : 'prettyCheckbox', // The classname of your custom checkbox
		display: 'list' // The style you want it to be display (inline or list)
	});
});
				</code>
			</pre>
<p>If you can to customize the look of the inputs, you can customize those image<br />
<img alt="" src="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/images/prettyCheckboxes/checkbox.gif" /> 			<img alt="" src="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/images/prettyCheckboxes/radio.gif" /> 			Please note that you have the hover and selected state in the same image and that the inputs should be at the same position, unless you want/can modify the CSS yourself.<br />
That&#8217;s it, now your inputs should behave the same as in the <a href="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/#demo">demo</a> on this page</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetexamples.wordpress.com/44/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetexamples.wordpress.com/44/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetexamples.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetexamples.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetexamples.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetexamples.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetexamples.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetexamples.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetexamples.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetexamples.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetexamples.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetexamples.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetexamples.wordpress.com&blog=4266731&post=44&subd=aspnetexamples&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetexamples.wordpress.com/2008/08/02/pretty-checkboxes-radiobutton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">anandnat</media:title>
		</media:content>

		<media:content url="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/images/prettyCheckboxes/checkbox.gif" medium="image" />

		<media:content url="http://www.no-margin-for-errors.com/projects/prettyCheckboxes/images/prettyCheckboxes/radio.gif" medium="image" />
	</item>
	</channel>
</rss>