<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZDima.net &#187; C#</title>
	<atom:link href="http://www.zdima.net/blog/archives/category/soft/dev/c/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zdima.net/blog</link>
	<description>UNIX, WEB</description>
	<lastBuildDate>Wed, 08 Sep 2010 18:30:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ServerInfo &#8211; Easily scan a Machine/Server Farm for Information</title>
		<link>http://www.zdima.net/blog/archives/15249</link>
		<comments>http://www.zdima.net/blog/archives/15249#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:48:00 +0000</pubDate>
		<dc:creator>naspinski</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Contributors]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/fd8df594b0ee2955</guid>
		<description><![CDATA[new open-source project in Asp.Net MVC 2


More than once I have been asked what databases are on what server, if server X is running application Y or what websites server ABC is running.  These are are relatively simple things to accomplish, and there...]]></description>
		<wfw:commentRss>http://www.zdima.net/blog/archives/15249/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using Server.MapPath() in an Generic Handler (.ashx)</title>
		<link>http://www.zdima.net/blog/archives/15222</link>
		<comments>http://www.zdima.net/blog/archives/15222#comments</comments>
		<pubDate>Thu, 22 Jul 2010 12:50:00 +0000</pubDate>
		<dc:creator>naspinski</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Contributors]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/3c638048ef7925c4</guid>
		<description><![CDATA[if you need to get a local file path in your ashx
Instead of using:
Server.MapPath()
Simply use:
System.Web.HttpContext.Current.Server.MapPath()


  
]]></description>
		<wfw:commentRss>http://www.zdima.net/blog/archives/15222/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline AJAX DropDown and Text Editing with Asp.Net MVC and jQuery</title>
		<link>http://www.zdima.net/blog/archives/15209</link>
		<comments>http://www.zdima.net/blog/archives/15209#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:31:00 +0000</pubDate>
		<dc:creator>naspinski</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Contributors]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/69d3f1cc6a323e8e</guid>
		<description><![CDATA[including how to use a database to populate the dropdown


First thing is first, you will need to download 
jQuery 
and the 
Jeditable 
plugin (I prefer to refer to it as the Jedi-Table!).
Be sure to put these references in your View (or Masterpage).
N...]]></description>
		<wfw:commentRss>http://www.zdima.net/blog/archives/15209/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline AJAX DropDown and Text Editing with Asp.Net MVC and jQuery</title>
		<link>http://www.zdima.net/blog/archives/15195</link>
		<comments>http://www.zdima.net/blog/archives/15195#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:31:00 +0000</pubDate>
		<dc:creator>naspinski</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Contributors]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/8bdd1f8fb10199aa</guid>
		<description><![CDATA[including how to use a database to populate the dropdown


First thing is first, you will need to download 
jQuery 
and the 
Jeditable 
plugin (I prefer to refer to it as the Jedi-Table!).
Be sure to put these references in your View (or Masterpage).
N...]]></description>
		<wfw:commentRss>http://www.zdima.net/blog/archives/15195/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit an Object Property Value Dynamically at Run Time</title>
		<link>http://www.zdima.net/blog/archives/15069</link>
		<comments>http://www.zdima.net/blog/archives/15069#comments</comments>
		<pubDate>Tue, 01 Jun 2010 16:13:00 +0000</pubDate>
		<dc:creator>naspinski</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Contributors]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/e6a128657ebb1ee9</guid>
		<description><![CDATA[<h2>no need to write a huge switch statement to make a run time decision</h2>

Imagine you have an Object with 50 properties, and at runtime, you only need to change the value of one of them.  You could write a switch statement to run through all of them, but there is a better way. This is how it would be done with a switch:
<pre>switch(propertyName)
{
    case "Name": obj.Name = newVal; break;
    case "Phone": obj.Phone = newVal; break;
    ///and so on...</pre>
<br />
That sounds like a terrible idea.  With Reflection, it was easy to build an extension to update any object with a new value at runtime (provided it can be written to) with the following code:
<pre>public static void SetPropertyValue(this object o, 
    string propertyName, object newValue)
{
    PropertyInfo pi;
    pi = o.GetType().GetProperty(propertyName);
    if (pi == null)
        throw new Exception("No Property [" + 
            propertyName + "] in Object [" + 
            o.GetType().ToString() + "]");
    if (!pi.CanWrite)
        throw new Exception("Property [" + 
            propertyName + "] in Object [" + 
            o.GetType().ToString() + 
            "] does not allow writes");
    pi.SetValue(o, newValue, null);
}</pre>
<br />
Now, instead of that 50+ line mess above, all you need to do to change the "Phone" property to 'newVal' is:
<pre>
obj.SetPropertyValue("Phone", newVal);
</pre>
<br />
I added this to my <a href="http://naspinski.codeplex.com">Naspinski.Utilities</a> Set on CodePlex as well.<p></p><div>
<a href="http://feeds.feedburner.com/~ff/naspinski?a=hSPE2LcA5yc:Y77-LWeo67Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/naspinski?d=yIl2AUoC8zA" border="0"></a> <a href="http://feeds.feedburner.com/~ff/naspinski?a=hSPE2LcA5yc:Y77-LWeo67Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/naspinski?i=hSPE2LcA5yc:Y77-LWeo67Y:gIN9vFwOqvQ" border="0"></a> <a href="http://feeds.feedburner.com/~ff/naspinski?a=hSPE2LcA5yc:Y77-LWeo67Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/naspinski?i=hSPE2LcA5yc:Y77-LWeo67Y:F7zBnMyn0Lo" border="0"></a>
</div><img src="http://feeds.feedburner.com/~r/naspinski/~4/hSPE2LcA5yc" height="1" width="1">]]></description>
		<wfw:commentRss>http://www.zdima.net/blog/archives/15069/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
