<?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>The Computer Mutt Blog</title>
	<atom:link href="http://computermutt.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://computermutt.wordpress.com</link>
	<description>A dog&#039;s breakfast of divergent computer knowledge</description>
	<lastBuildDate>Tue, 07 Jun 2011 06:27:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='computermutt.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Computer Mutt Blog</title>
		<link>http://computermutt.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://computermutt.wordpress.com/osd.xml" title="The Computer Mutt Blog" />
	<atom:link rel='hub' href='http://computermutt.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Changing URL of Team Foundation Server 2010 Projects</title>
		<link>http://computermutt.wordpress.com/2011/04/11/changing-url-of-team-foundation-server-2010-projects/</link>
		<comments>http://computermutt.wordpress.com/2011/04/11/changing-url-of-team-foundation-server-2010-projects/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 20:06:57 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Team Foundation Server 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[host name]]></category>
		<category><![CDATA[IIS 7]]></category>
		<category><![CDATA[Regedit]]></category>
		<category><![CDATA[Source Code Binding]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=483</guid>
		<description><![CDATA[If you want to change the URL of your projects in Team Foundation Server, sometimes it&#8217;s as straightforward as changing one URL in a dialog box.  However, good luck with that.  Probably there will be network, software configuration and work-flow after effects you need to deal with, and I thought I&#8217;d put them all in one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=483&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you want to change the URL of your projects in Team Foundation Server, sometimes it&#8217;s as straightforward as changing one URL in a dialog box.  However, good luck with that.  Probably there will be network, software configuration and work-flow after effects you need to deal with, and I thought I&#8217;d put them all in one place to make it easier for others trying to change their project URL&#8217;s.</p>
<p>Here is a summary of what you may have to do, and these steps are covered in this post:</p>
<ol>
<li>Change default URL in TFS administrative control panel</li>
<li>Add new registry entry to allow default machine name to be different from URL</li>
<li>Change TFS web config file to include your new URL</li>
<li>Add new project location URL in Visual Studio</li>
<li>Unbind solution from source control that points to old URL</li>
<li>Bind solution to source control that points to new URL</li>
</ol>
<p>This first <a href="http://www.tjopsta.net/index.php/2010/04/16/how-to-change-team-foundation-server-2010-urls-for-use-externally/">blog post</a> is helpful in that the author will also deal with what has to happen if  TFS is linked to SharePoint.  If simply changing the name does&#8217;t work completely further on down in interactive posts, there is a reference to changing your registry.  You&#8217;ll need to add a DWORD to HKLM\System\CurrentControlSet\Control\Lsa and call it DisableLoopbackCheck as you can see in the screen shot below.</p>
<p><a href="http://computermutt.files.wordpress.com/2011/04/item001.png"><img class="aligncenter size-full wp-image-486" title="Regedit" src="http://computermutt.files.wordpress.com/2011/04/item001.png?w=600&#038;h=579" alt="" width="600" height="579" /></a></p>
<p>For me, this was only part of the solution.  The other was that I had to edit the web.config file of TFS to allow me to use the new url.  Here is the <a href="http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2010/06/09/tf31002-altering-the-url-that-your-tfs-2010-web-client-uses-to-talk-to-the-at.aspx">link </a>to that post.</p>
<p>So, after changing the URL in the TFS control panel, changing the registry and reconfiguring the TFS web site web.config file I was able to access TFS from my new URL both inside and outside of my network.</p>
<p>One additional issue remains.  That is in Visual Studio, your project is bound to the old location and now you&#8217;ll not only have to bind your project to your new location, but you&#8217;ll have to remove all source code bindings from the old location and change them to the new location.</p>
<p>To add a new TFS location, go to Connect to Team Project and then click on the Servers&#8230; button.  Then Click on add, and enter in the name of your new URL as shown below.  The old name was MMANT4, and the new name is tfs.maltercorp.com:</p>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 610px"><a href="http://computermutt.files.wordpress.com/2011/04/connecttonewtfs.png"><img class="size-full wp-image-490" title="ConnectToNewTFS" src="http://computermutt.files.wordpress.com/2011/04/connecttonewtfs.png?w=600&#038;h=441" alt="" width="600" height="441" /></a><p class="wp-caption-text">Connect to new TFS</p></div>
<p>To remove source control bindings from the old URL, you access that through File/Source Control.  The menu items will be different given what Visual Studio detects.  I opened my project and because it had source control bindings pointing to a different location, I got a dialog box that told me it was going to open in disconnected mode.</p>
<p>When you do that and then open Source Control through the File menu, you&#8217;ll see choices to unbind which I did.  Then I went back in to File/Source Control and clicked on bind to source control.  I clicked through the error messages using the ignore button.  All history is retained.</p>
<p>I did not test this in a multi-participant team environment, so I don&#8217;t know what will happen if you have other developers.  I suspect that they will have to unbind and bind back to source control as well as bind to a new TFS server location.  I&#8217;m sure if there are a number of developers, this will require some coordination on your part.</p>
<p>If I had TFS to set up all over again, I would look into what it would take to create it with a URL that is useful to outside users.</p>
<p>None of this was hard to do, but there was a lot of stuff in many different places, and I thought putting it all together on one place would be useful.</p>
<br />Filed under: <a href='http://computermutt.wordpress.com/category/iis/'>IIS</a>, <a href='http://computermutt.wordpress.com/category/networking/'>Networking</a>, <a href='http://computermutt.wordpress.com/category/programming/'>Programming</a>, <a href='http://computermutt.wordpress.com/category/team-foundation-server-2010/'>Team Foundation Server 2010</a>, <a href='http://computermutt.wordpress.com/category/visual-studio-2010/'>Visual Studio 2010</a> Tagged: <a href='http://computermutt.wordpress.com/tag/host-name/'>host name</a>, <a href='http://computermutt.wordpress.com/tag/iis-7/'>IIS 7</a>, <a href='http://computermutt.wordpress.com/tag/regedit/'>Regedit</a>, <a href='http://computermutt.wordpress.com/tag/source-code-binding/'>Source Code Binding</a>, <a href='http://computermutt.wordpress.com/tag/team-foundation-server/'>Team Foundation Server</a>, <a href='http://computermutt.wordpress.com/tag/tfs/'>TFS</a>, <a href='http://computermutt.wordpress.com/tag/url/'>URL</a>, <a href='http://computermutt.wordpress.com/tag/visual-studio-2010/'>Visual Studio 2010</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/483/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=483&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2011/04/11/changing-url-of-team-foundation-server-2010-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/04/item001.png" medium="image">
			<media:title type="html">Regedit</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/04/connecttonewtfs.png" medium="image">
			<media:title type="html">ConnectToNewTFS</media:title>
		</media:content>
	</item>
		<item>
		<title>Breaking out of HTTP.SYS hell</title>
		<link>http://computermutt.wordpress.com/2011/03/03/breaking-out-of-http-sys-hell/</link>
		<comments>http://computermutt.wordpress.com/2011/03/03/breaking-out-of-http-sys-hell/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 01:54:55 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=455</guid>
		<description><![CDATA[Creating a host header in your WCF service host averts Service Reference binding errors.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=455&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am working on using SSL with WCF and when it came time for me to add a service reference for my project I kept getting the following error: &#8220;<strong>This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case.</strong>&#8220;</p>
<p>I was able to access my SVC file in a browser using the new domain certificate I had created for the service website.  The certificate was issued by our domain certificate authority.   I was also able to access the WSDL file as well with no problems.</p>
<div id="attachment_473" class="wp-caption aligncenter" style="width: 610px"><a href="http://computermutt.files.wordpress.com/2011/03/0.png"><img class="size-full wp-image-473" title="0" src="http://computermutt.files.wordpress.com/2011/03/0.png?w=600&#038;h=404" alt="SecureService Service SVC File" width="600" height="404" /></a><p class="wp-caption-text">SecureService Service SVC File</p></div>
<p>So, why was I getting an error when trying to create a service reference?  Because the web site&#8217;s http binding did not have a host header.  To add a host header to your website, open IIS Manager and click on the web site you want to configure.</p>
<div id="attachment_459" class="wp-caption aligncenter" style="width: 610px"><a href="http://computermutt.files.wordpress.com/2011/03/1.png"><img class="size-full wp-image-459" title="1" src="http://computermutt.files.wordpress.com/2011/03/1.png?w=600&#038;h=178" alt="" width="600" height="178" /></a><p class="wp-caption-text">IIS Manager</p></div>
<p>Next, click on the bindings link to open the Site Bindings dialog box.  Find the http type, click on it and then click on the edit button on the right to open the Edit Site Binding dialog box.</p>
<div id="attachment_462" class="wp-caption aligncenter" style="width: 610px"><a href="http://computermutt.files.wordpress.com/2011/03/2.png"><img class="size-full wp-image-462" title="2" src="http://computermutt.files.wordpress.com/2011/03/2.png?w=600&#038;h=251" alt="" width="600" height="251" /></a><p class="wp-caption-text">Site Bindings Dialog Box</p></div>
<p>In the Host name edit control, enter the friendly name you used when creating the certificate.  Don&#8217;t enter http or https.  Click ok.  Click Close to close the Site Bindings dialog box.</p>
<div id="attachment_472" class="wp-caption aligncenter" style="width: 535px"><a href="http://computermutt.files.wordpress.com/2011/03/3.png"><img class="size-full wp-image-472" title="3" src="http://computermutt.files.wordpress.com/2011/03/3.png?w=525&#038;h=291" alt="Edit Site Binding" width="525" height="291" /></a><p class="wp-caption-text">Edit Site Binding</p></div>
<p>Now go back to your client and click on Service References and right click to get the popup menu and then click on Add Service Reference.  In the Address: edit control enter the URL of your service, and in the Namespace enter in the name you want for your service reference and then click go.</p>
<div id="attachment_476" class="wp-caption aligncenter" style="width: 610px"><a href="http://computermutt.files.wordpress.com/2011/03/4.png"><img class="size-full wp-image-476" title="4" src="http://computermutt.files.wordpress.com/2011/03/4.png?w=600&#038;h=450" alt="Add Service Reference" width="600" height="450" /></a><p class="wp-caption-text">Add Service Reference</p></div>
<p>You should get a windows login dialog box.  Provide your login credentials and click on and you now have your service reference.</p>
<p><a href="http://computermutt.files.wordpress.com/2011/03/5.png"><img class="aligncenter size-full wp-image-477" title="5" src="http://computermutt.files.wordpress.com/2011/03/5.png?w=600&#038;h=434" alt="" width="600" height="434" /></a></p>
<p><a href="http://computermutt.files.wordpress.com/2011/03/6.png"><img class="aligncenter size-full wp-image-478" title="6" src="http://computermutt.files.wordpress.com/2011/03/6.png?w=547&#038;h=560" alt="" width="547" height="560" /></a></p>
<p><a href="http://computermutt.files.wordpress.com/2011/03/7.png"><img class="aligncenter size-full wp-image-479" title="7" src="http://computermutt.files.wordpress.com/2011/03/7.png?w=600&#038;h=435" alt="" width="600" height="435" /></a></p>
<p>I don&#8217;t have a lot of experience with host headers other than having to use them when you only have a single IP address and want multiple web sites (not virtual websites, but top level websites) to share it.  When given a choice,  I opt for adding multiple IP&#8217;s on a NIC and then every website gets a separate IP Address and separate DNS address.</p>
<p>However, I guess now there are other reasons for using host headers, and breaking out of HTTP.SYS hell is one of them.</p>
<br />Filed under: <a href='http://computermutt.wordpress.com/category/iis/'>IIS</a>, <a href='http://computermutt.wordpress.com/category/programming/'>Programming</a>, <a href='http://computermutt.wordpress.com/category/ssl/'>SSL</a>, <a href='http://computermutt.wordpress.com/category/wcf/'>WCF</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/455/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=455&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2011/03/03/breaking-out-of-http-sys-hell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/0.png" medium="image">
			<media:title type="html">SecureService Service SVC File</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/1.png" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/2.png" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/3.png" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/4.png" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/5.png" medium="image">
			<media:title type="html">5</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/6.png" medium="image">
			<media:title type="html">6</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2011/03/7.png" medium="image">
			<media:title type="html">7</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Dropdown in an ASP.NET GridView Control</title>
		<link>http://computermutt.wordpress.com/2009/12/25/creating-a-dropdown-in-an-asp-net-gridview-control/</link>
		<comments>http://computermutt.wordpress.com/2009/12/25/creating-a-dropdown-in-an-asp-net-gridview-control/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 03:29:50 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=441</guid>
		<description><![CDATA[To create a Dropdown control in an ASP.NET GridView control, you create a template field and wire the behavior to populate the dropdown in the RowDataBound event of the GridView.  Here is a simple example. In the GridView, we created the template field with an ItemTemplate and inserted the Dropdown control.  Also, note that we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=441&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To create a Dropdown control in an ASP.NET GridView control, you create a template field and wire the behavior to populate the dropdown in the RowDataBound event of the GridView.  Here is a simple example.</p>
<p>In the GridView, we created the template field with an ItemTemplate and inserted the Dropdown control.  Also, note that we wired up the OnRowDataBound event in the GridView&#8217;s tag.</p>
<pre class="brush: xml;">
&lt;asp:gridview id=&quot;gvSeminarSchedule&quot; onrowdatabound=&quot;gvSeminarSchedule_RowDataBound&quot;
	runat=&quot;server&quot; autogeneratecolumns=&quot;False&quot; onselectedindexchanged=&quot;gvSeminarSchedule_SelectedIndexChanged&quot;
	onselectedindexchanging=&quot;gvSeminarSchedule_SelectedIndexChanging&quot; datakeynames=&quot;SeminarScheduleID&quot;&gt;
	&lt;alternatingrowstyle cssclass=&quot;GridRowAlternate&quot; /&gt;
	&lt;rowstyle cssclass=&quot;GridRowStandard&quot; /&gt;
	&lt;headerstyle cssclass=&quot;ItemLabelCenter&quot; /&gt;
	&lt;selectedrowstyle cssclass=&quot;GridRowSelected&quot; /&gt;
	&lt;columns&gt;
		&lt;asp:boundfield datafield=&quot;SeminarScheduleID&quot; headertext=&quot;ID&quot; /&gt;
		&lt;asp:boundfield datafield=&quot;FormattedStartDate&quot; headertext=&quot;Seminar Start&quot; htmlencode=&quot;false&quot; /&gt;
		&lt;asp:boundfield datafield=&quot;FormattedEndDate&quot; headertext=&quot;Seminar End&quot; htmlencode=&quot;false&quot; /&gt;
		&lt;asp:boundfield datafield=&quot;RegisterStartDateString&quot; headertext=&quot;Register Start&quot; /&gt;
		&lt;asp:boundfield datafield=&quot;RegisterEndDateString&quot; headertext=&quot;Register End&quot; /&gt;
		&lt;asp:boundfield datafield=&quot;RegisterEarlyPriceEndDateString&quot; headertext=&quot;Register Early Price End&quot; insertvisible=&quot;False&quot; readonly=&quot;True&quot; /&gt;
		&lt;asp:templatefield headertext=&quot;Students&quot;&gt;
			&lt;itemtemplate&gt;
				&lt;asp:dropdownlist runat=&quot;server&quot; id=&quot;ddStudent&quot;&gt;&lt;/asp:dropdownlist&gt;
			&lt;/itemtemplate&gt;
		&lt;/asp:templatefield&gt;
	&lt;/columns&gt;
&lt;/asp:gridview&gt;
</pre>
<p>In the page behind, we are testing for a DataRow, and if it is then we find the DropDown control instance for the row and populate it.</p>
<pre class="brush: csharp;">
protected void gvSeminarSchedule_RowDataBound( object sender, GridViewRowEventArgs e )
{
	if ( e.Row.RowType == DataControlRowType.DataRow )
	{
		SeminarSchedule seminarSchedule = new SeminarSchedule();
		seminarSchedule.SeminarScheduleID = e.Row.Cells[ 0 ].Text.ToInt();
		DropDownList ddl = (DropDownList)e.Row.FindControl( &quot;ddStudent&quot; );
		ddl.DataSource = seminarSchedule.ListStudentsByNameLastFirst();
		ddl.DataMember = &quot;PersonID&quot;;
		ddl.DataTextField = &quot;FullNameLastFirst&quot;;
		ddl.DataBind();
	}
}
</pre>
<br />Posted in Programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=441&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/12/25/creating-a-dropdown-in-an-asp-net-gridview-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS Colors and Hex Values</title>
		<link>http://computermutt.wordpress.com/2009/12/25/css-colors-and-hex-values/</link>
		<comments>http://computermutt.wordpress.com/2009/12/25/css-colors-and-hex-values/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 00:46:36 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=436</guid>
		<description><![CDATA[The following list are colors and their hex values that all browsers will understand. AliceBlue #F0F8FF AntiqueWhite #FAEBD7 Aqua #00FFFF Aquamarine #7FFFD4 Azure #F0FFFF Beige #F5F5DC Bisque #FFE4C4 Black #000000 BlanchedAlmond #FFEBCD Blue #0000FF BlueViolet #8A2BE2 Brown #A52A2A BurlyWood #DEB887 CadetBlue #5F9EA0 Chartreuse #7FFF00 Chocolate #D2691E Coral #FF7F50 CornflowerBlue #6495ED Cornsilk #FFF8DC Crimson #DC143C Cyan [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=436&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following list are colors and their hex values that all browsers will understand.</p>
<p>AliceBlue #F0F8FF<br />
AntiqueWhite #FAEBD7<br />
Aqua #00FFFF<br />
Aquamarine #7FFFD4<br />
Azure #F0FFFF<br />
Beige #F5F5DC<br />
Bisque #FFE4C4<br />
Black #000000<br />
BlanchedAlmond #FFEBCD<br />
Blue #0000FF<br />
BlueViolet #8A2BE2<br />
Brown #A52A2A<br />
BurlyWood #DEB887<br />
CadetBlue #5F9EA0<br />
Chartreuse #7FFF00<br />
Chocolate #D2691E<br />
Coral #FF7F50<br />
CornflowerBlue #6495ED<br />
Cornsilk #FFF8DC<br />
Crimson #DC143C<br />
Cyan #00FFFF<br />
DarkBlue #00008B<br />
DarkCyan #008B8B<br />
DarkGoldenRod #B8860B<br />
DarkGray #A9A9A9<br />
DarkGreen #006400<br />
DarkKhaki #BDB76B<br />
DarkMagenta #8B008B<br />
DarkOliveGreen #556B2F<br />
Darkorange #FF8C00<br />
DarkOrchid #9932CC<br />
DarkRed #8B0000<br />
DarkSalmon #E9967A<br />
DarkSeaGreen #8FBC8F<br />
DarkSlateBlue #483D8B<br />
DarkSlateGray #2F4F4F<br />
DarkTurquoise #00CED1<br />
DarkViolet #9400D3<br />
DeepPink #FF1493<br />
DeepSkyBlue #00BFFF<br />
DimGray #696969<br />
DodgerBlue #1E90FF<br />
FireBrick #B22222<br />
FloralWhite #FFFAF0<br />
ForestGreen #228B22<br />
Fuchsia #FF00FF<br />
Gainsboro #DCDCDC<br />
GhostWhite #F8F8FF<br />
Gold #FFD700<br />
GoldenRod #DAA520<br />
Gray #808080<br />
Green #008000<br />
GreenYellow #ADFF2F<br />
HoneyDew #F0FFF0<br />
HotPink #FF69B4<br />
IndianRed #CD5C5C<br />
Indigo #4B0082<br />
Ivory #FFFFF0<br />
Khaki #F0E68C<br />
Lavender #E6E6FA<br />
LavenderBlush #FFF0F5<br />
LawnGreen #7CFC00<br />
LemonChiffon #FFFACD<br />
LightBlue #ADD8E6<br />
LightCoral #F08080<br />
LightCyan #E0FFFF<br />
LightGoldenRodYellow #FAFAD2<br />
LightGrey #D3D3D3<br />
LightGreen #90EE90<br />
LightPink #FFB6C1<br />
LightSalmon #FFA07A<br />
LightSeaGreen #20B2AA<br />
LightSkyBlue #87CEFA<br />
LightSlateGray #778899<br />
LightSteelBlue #B0C4DE<br />
LightYellow #FFFFE0<br />
Lime #00FF00<br />
LimeGreen #32CD32<br />
Linen #FAF0E6<br />
Magenta #FF00FF<br />
Maroon #800000<br />
MediumAquaMarine #66CDAA<br />
MediumBlue #0000CD<br />
MediumOrchid #BA55D3<br />
MediumPurple #9370D8<br />
MediumSeaGreen #3CB371<br />
MediumSlateBlue #7B68EE<br />
MediumSpringGreen #00FA9A<br />
MediumTurquoise #48D1CC<br />
MediumVioletRed #C71585<br />
MidnightBlue #191970<br />
MintCream #F5FFFA<br />
MistyRose #FFE4E1<br />
Moccasin #FFE4B5<br />
NavajoWhite #FFDEAD<br />
Navy #000080<br />
OldLace #FDF5E6<br />
Olive #808000<br />
OliveDrab #6B8E23<br />
Orange #FFA500<br />
OrangeRed #FF4500<br />
Orchid #DA70D6<br />
PaleGoldenRod #EEE8AA<br />
PaleGreen #98FB98<br />
PaleTurquoise #AFEEEE<br />
PaleVioletRed #D87093<br />
PapayaWhip #FFEFD5<br />
PeachPuff #FFDAB9<br />
Peru #CD853F<br />
Pink #FFC0CB<br />
Plum #DDA0DD<br />
PowderBlue #B0E0E6<br />
Purple #800080<br />
Red #FF0000<br />
RosyBrown #BC8F8F<br />
RoyalBlue #4169E1<br />
SaddleBrown #8B4513<br />
Salmon #FA8072<br />
SandyBrown #F4A460<br />
SeaGreen #2E8B57<br />
SeaShell #FFF5EE<br />
Sienna #A0522D<br />
Silver #C0C0C0<br />
SkyBlue #87CEEB<br />
SlateBlue #6A5ACD<br />
SlateGray #708090<br />
Snow #FFFAFA<br />
SpringGreen #00FF7F<br />
SteelBlue #4682B4<br />
Tan #D2B48C<br />
Teal #008080<br />
Thistle #D8BFD8<br />
Tomato #FF6347<br />
Turquoise #40E0D0<br />
Violet #EE82EE<br />
Wheat #F5DEB3<br />
White #FFFFFF<br />
WhiteSmoke #F5F5F5<br />
Yellow #FFFF00<br />
YellowGreen #9ACD32</p>
<br />Posted in CSS Tagged: CSS <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/436/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=436&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/12/25/css-colors-and-hex-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>Supporting Multiple Dates in .NET Calendar Control</title>
		<link>http://computermutt.wordpress.com/2009/12/25/supporting-multiple-dates-in-net-calendar-control/</link>
		<comments>http://computermutt.wordpress.com/2009/12/25/supporting-multiple-dates-in-net-calendar-control/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 00:38:18 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[Calendar Control]]></category>
		<category><![CDATA[DayRender]]></category>
		<category><![CDATA[SelectionChanged Event]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=423</guid>
		<description><![CDATA[This post will help you to support using multiple dates in a calendar control.  You will be able to populate your control with multiple dates from a data source, and then allow your users to interact with those selections, selecting or deselecting additional or existing dates for saving back to your data source. The calendar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=423&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post will help you to support using multiple dates in a calendar control.  You will be able to populate your control with multiple dates from a data source, and then allow your users to interact with those selections, selecting or deselecting additional or existing dates for saving back to your data source.</p>
<p>The calendar control does not support databinding, so you have to use the DayRender event to make your selections appear.   You&#8217;ll also need to use the SelectionChanged event to manage selections and then some kind of a persistent storage that can live on the page like a session or use the viewstate bag.</p>
<p>So, anything coming in from the database gets handled in the DayRender event, and any changes get handled in the SelectionChanged event.  All of this should point to persistant storage such as a session variable or in the view state.  When you want to save what the user did, grab whatever you have in your session or view state and send it back to the database.</p>
<p>Here is my html for the control.</p>
<pre class="brush: xml;">
&lt;asp:calendar id=&quot;cSeminarDate&quot; runat=&quot;server&quot; enableviewstate=&quot;true&quot;
	daynameformat=&quot;Shortest&quot; cssclass=&quot;CalendarStandard&quot;
	onselectionchanged=&quot;cSeminarDate_SelectionChanged&quot;
	ondayrender=&quot;cSeminarDate_DayRender&quot;&gt;
	&lt;dayheaderstyle cssclass=&quot;CalendarStandardDayHeaderStyle&quot; /&gt;
	&lt;daystyle cssclass=&quot;CalendarStandardDayStyle&quot; /&gt;
	&lt;nextprevstyle cssclass=&quot;CalendarStandardNextPrevStyle&quot; /&gt;
	&lt;othermonthdaystyle cssclass=&quot;CalendarStandardOtherMonthDayStyle&quot; /&gt;
	&lt;selecteddaystyle cssclass=&quot;CalendarStandardSelectedDayStyle&quot; /&gt;
	&lt;selectorstyle cssclass=&quot;CalendarStandardSelectorStyle&quot; /&gt;
	&lt;titlestyle cssclass=&quot;CalendarStandardTitleStyle&quot; /&gt;
	&lt;todaydaystyle cssclass=&quot;CalendarStandardTodayDayStyle&quot; /&gt;
	&lt;weekenddaystyle cssclass=&quot;CalendarStandardWeekendDayStyle&quot; /&gt;
&lt;/asp:calendar&gt;
</pre>
<p>What I did in this example was to create a session variable to store a List&lt;DateTime&gt;.   After populating my list with selected dates elsewhere in code, in the DayRender event (this event fires for every date in the calendar control), I compared the date that the control was currently drawing with my list, and if there was a match, I set the cell&#8217;s css class property to my selector style.</p>
<p>The following code is what I am using to populate my calendar control with selected dates.</p>
<pre class="brush: csharp;">
protected void cSeminarDate_DayRender( object sender, DayRenderEventArgs e )
{
	List&lt;DateTime&gt; dt = SessionManager.GetInstance( HttpContext.Current ).SeminarDateList;
	foreach ( DateTime d in dt )
	{
		if ( d.ToShortDateString() == e.Day.Date.ToShortDateString() )
		{
			e.Cell.CssClass = &quot;CalendarStandardSelectorStyle&quot;;
		}
	}
}
</pre>
<p>After I have my calendar populated with selected dates, my users are now in a position to deselect existing dates as well as to add new dates.  The following code below uses the SelectionChanged event in conjunction with the session.</p>
<pre class="brush: csharp;">
protected void cSeminarDate_SelectionChanged( object sender, EventArgs e )
{
	if ( SessionManager.GetInstance( HttpContext.Current ).SeminarDateList.Contains(cSeminarDate.SelectedDate) )
	{
		SessionManager.GetInstance( HttpContext.Current ).SeminarDateList.Remove( cSeminarDate.SelectedDate );
		cSeminarDate.SelectedDates.Remove( cSeminarDate.SelectedDate );
	}
	else
	{
		SessionManager.GetInstance( HttpContext.Current ).SeminarDateList.Add( cSeminarDate.SelectedDate );
	}

	foreach ( DateTime dt in SessionManager.GetInstance( HttpContext.Current ).SeminarDateList )
	{
		cSeminarDate.SelectedDates.Add( dt );
	}
}
</pre>
<p>Where you see references to SessionManager.GetInstance( HttpContext.Current ).SeminarDateList, you can replace with Session["SeminarDateList" ] as I manage my sessions explicitly in a single location.  Make sure to remember to clear your session when you init your page.  I have an InitUI() method I call if not a postback in the Page_Load event and elsewhere.  In there I do this </p>
<p><span style="color:#2b91af;font-size:x-small;"><span style="color:#2b91af;font-size:x-small;"><span style="color:#2b91af;font-size:x-small;"><span style="color:#2b91af;font-size:x-small;">SessionManager</span></span></span></span><span style="font-size:x-small;">.GetInstance( </span><span style="color:#2b91af;font-size:x-small;"><span style="color:#2b91af;font-size:x-small;">HttpContext</span></span><span style="font-size:x-small;">.Current ).SeminarDateList.Clear();</span></p>
<p>Hope this helps.</p>
<br />Posted in Programming Tagged: .net 3.5, Calendar Control, DayRender, SelectionChanged Event <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/423/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=423&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/12/25/supporting-multiple-dates-in-net-calendar-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>Break out of WebForm_DoPostBackWithOptions Hell</title>
		<link>http://computermutt.wordpress.com/2009/10/28/break-out-of-webform_dopostbackwithoptions-hell/</link>
		<comments>http://computermutt.wordpress.com/2009/10/28/break-out-of-webform_dopostbackwithoptions-hell/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 22:35:31 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[CommandName]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[OnRowCommand]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=419</guid>
		<description><![CDATA[I have been going nuts all day trying to get a link button to fire its command event and cause a postback in a GridView control.  On this particular page, whenever I click on the link, I get a WebForm_DoPostBackWithOptions instead of __doPostback, and of course I never hit the grid&#8217;s command event in my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=419&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been going nuts all day trying to get a link button to fire its command event and cause a postback in a GridView control.  On this particular page, whenever I click on the link, I get a WebForm_DoPostBackWithOptions instead of __doPostback, and of course I never hit the grid&#8217;s command event in my page behind.</p>
<p>The solution?  Set <span style="color:#ff0000;font-size:x-small;"><span style="color:#ff0000;font-size:x-small;">causesvalidation</span></span><span style="color:#0000ff;font-size:x-small;"><span style="color:#0000ff;font-size:x-small;">=&#8221;false&#8221; <span style="color:#000000;">in the link button and the command event will fire.   Why, I don&#8217;t know, this just works and hopefully you&#8217;ll find this post before having to spend too many hours trying to figure it out.</span></span></span></p>
<br />Posted in Programming Tagged: .net 3.5, c#, CommandName, GridView, OnRowCommand <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/419/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=419&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/10/28/break-out-of-webform_dopostbackwithoptions-hell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>Mapping .NET CLR Datatypes with SQL Server 2008 Parameters</title>
		<link>http://computermutt.wordpress.com/2009/10/12/mapping-net-clr-datatypes-with-sql-server-2008-parameters/</link>
		<comments>http://computermutt.wordpress.com/2009/10/12/mapping-net-clr-datatypes-with-sql-server-2008-parameters/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:30:55 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=411</guid>
		<description><![CDATA[The following table maps .NET CLR datatypes with SQL Server parameters.  The full Microsoft article is here. SQL Server data type CLR data type (SQL Server) CLR data type (.NET Framework) bigint SqlInt64 Int64, Nullable&#60;Int64&#62; binary SqlBytes, SqlBinary Byte[] bit SqlBoolean Boolean, Nullable&#60;Boolean&#62; char None None cursor None None date SqlDateTime DateTime, Nullable&#60;DateTime&#62; datetime SqlDateTime [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=411&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following table maps .NET CLR datatypes with SQL Server parameters.  The full Microsoft article is <a href="http://msdn.microsoft.com/en-us/library/ms131092.aspx" target="_blank">here</a>.</p>
<table border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td valign="top"><strong>SQL Server data type</strong></td>
<td valign="top"><strong>CLR data type (SQL Server)</strong></td>
<td valign="top"><strong>CLR data type (.NET Framework)</strong></td>
</tr>
<tr>
<td valign="top"><strong>bigint</strong></td>
<td valign="top"><strong>SqlInt64</strong></td>
<td valign="top"><strong>Int64, Nullable&lt;Int64&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>binary</strong></td>
<td valign="top"><strong>SqlBytes, SqlBinary</strong></td>
<td valign="top"><strong>Byte[]</strong></td>
</tr>
<tr>
<td valign="top"><strong>bit</strong></td>
<td valign="top"><strong>SqlBoolean</strong></td>
<td valign="top"><strong>Boolean, Nullable&lt;Boolean&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>char</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>cursor</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>date</strong></td>
<td valign="top"><strong>SqlDateTime</strong></td>
<td valign="top"><strong>DateTime, Nullable&lt;DateTime&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>datetime</strong></td>
<td valign="top"><strong>SqlDateTime</strong></td>
<td valign="top"><strong>DateTime, Nullable&lt;DateTime&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>datetime2</strong></td>
<td valign="top"><strong>SqlDateTime</strong></td>
<td valign="top"><strong>DateTime, Nullable&lt;DateTime&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>DATETIMEOFFSET</strong></td>
<td valign="top"><strong>None</strong></td>
<td valign="top"><strong>DateTimeOffset, Nullable&lt;DateTimeOffset&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>decimal</strong></td>
<td valign="top"><strong>SqlDecimal</strong></td>
<td valign="top"><strong>Decimal, Nullable&lt;Decimal&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>float</strong></td>
<td valign="top"><strong>SqlDouble</strong></td>
<td valign="top"><strong>Double, Nullable&lt;Double&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>geography</strong></td>
<td valign="top"><strong>SqlGeography</strong><strong>SqlGeography</strong> is defined in Microsoft.SqlServer.Types.dll, which is installed with SQL Server and can be downloaded from the SQL Server 2008 <a href="http://go.microsoft.com/fwlink/?LinkId=131220">feature pack</a>.</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>geometry</strong></td>
<td valign="top"><strong>SqlGeometry</strong><strong>SqlGeometry</strong> is defined in Microsoft.SqlServer.Types.dll, which is installed with SQL Server and can be downloaded from the SQL Server 2008 <a href="http://go.microsoft.com/fwlink/?LinkId=131220">feature pack</a>.</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>hierarchyid</strong></td>
<td valign="top"><strong>SqlHierarchyId</strong><strong>SqlHierarchyId</strong> is defined in Microsoft.SqlServer.Types.dll, which is installed with SQL Server and can be downloaded from the SQL Server 2008 <a href="http://go.microsoft.com/fwlink/?LinkId=131220">feature pack</a>.</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>image</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>int</strong></td>
<td valign="top"><strong>SqlInt32</strong></td>
<td valign="top"><strong>Int32, Nullable&lt;Int32&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>money</strong></td>
<td valign="top"><strong>SqlMoney</strong></td>
<td valign="top"><strong>Decimal, Nullable&lt;Decimal&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>nchar</strong></td>
<td valign="top"><strong>SqlChars, SqlString</strong></td>
<td valign="top"><strong>String, Char[]</strong></td>
</tr>
<tr>
<td valign="top"><strong>ntext</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>numeric</strong></td>
<td valign="top"><strong>SqlDecimal</strong></td>
<td valign="top"><strong>Decimal, Nullable&lt;Decimal&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>nvarchar</strong></td>
<td valign="top"><strong>SqlChars, SqlString</strong><strong>SQLChars</strong> is a better match for data transfer and access, and <strong>SQLString</strong> is a better match for performing String operations.</td>
<td valign="top"><strong>String, Char[]</strong></td>
</tr>
<tr>
<td valign="top"><strong>nvarchar(1), nchar(1)</strong></td>
<td valign="top"><strong>SqlChars, SqlString</strong></td>
<td valign="top"><strong>Char, String, Char[], Nullable&lt;char&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>real</strong></td>
<td valign="top"><strong>SqlSingle</strong></td>
<td valign="top"><strong>Single, Nullable&lt;Single&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>rowversion</strong></td>
<td valign="top">None</td>
<td valign="top"><strong>Byte[]</strong></td>
</tr>
<tr>
<td valign="top"><strong>smallint</strong></td>
<td valign="top"><strong>SqlInt16</strong></td>
<td valign="top"><strong>Int16, Nullable&lt;Int16&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>smallmoney</strong></td>
<td valign="top"><strong>SqlMoney</strong></td>
<td valign="top"><strong>Decimal, Nullable&lt;Decimal&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>sql_variant</strong></td>
<td valign="top">None</td>
<td valign="top"><strong>Object</strong></td>
</tr>
<tr>
<td valign="top"><strong>table</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>text</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>time</strong></td>
<td valign="top"><strong>TimeSpan</strong></td>
<td valign="top"><strong>TimeSpan, Nullable&lt;TimeSpan&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>timestamp</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>tinyint</strong></td>
<td valign="top"><strong>SqlByte</strong></td>
<td valign="top"><strong>Byte, Nullable&lt;Byte&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>uniqueidentifier</strong></td>
<td valign="top"><strong>SqlGuid</strong></td>
<td valign="top"><strong>Guid, Nullable&lt;Guid&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>User-defined type(UDT)</strong></td>
<td valign="top">None</td>
<td valign="top">The same class that is bound to the user-defined type in the same assembly or a dependent assembly.</td>
</tr>
<tr>
<td valign="top"><strong>varbinary </strong></td>
<td valign="top"><strong>SqlBytes, SqlBinary</strong></td>
<td valign="top"><strong>Byte[]</strong></td>
</tr>
<tr>
<td valign="top"><strong>varbinary(1), binary(1)</strong></td>
<td valign="top"><strong>SqlBytes, SqlBinary</strong></td>
<td valign="top"><strong>byte, Byte[], Nullable&lt;byte&gt;</strong></td>
</tr>
<tr>
<td valign="top"><strong>varchar</strong></td>
<td valign="top">None</td>
<td valign="top">None</td>
</tr>
<tr>
<td valign="top"><strong>xml</strong></td>
<td valign="top"><strong>SqlXml</strong></td>
<td valign="top">None</td>
</tr>
</tbody>
</table>
<p>Hope this helps.</p>
<br />Posted in Programming, SQL Server Tagged: .NET, c#, CLR, SQL Server 2008 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/411/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=411&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/10/12/mapping-net-clr-datatypes-with-sql-server-2008-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>Solve new page flicker in AJAX</title>
		<link>http://computermutt.wordpress.com/2009/10/09/solve-new-page-flicker-in-ajax/</link>
		<comments>http://computermutt.wordpress.com/2009/10/09/solve-new-page-flicker-in-ajax/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 00:15:35 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[AJAX Control Toolkit]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=403</guid>
		<description><![CDATA[Want to stop flickering when going from one page to another in AJAX? Put the following code in your head section: For more details about these meta settings, go to http://www.aim-higher.net/meta-transitions.asp. Posted in AJAX Tagged: .net 3.5, AJAX, AJAX Control Toolkit, c#<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=403&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Want to stop flickering when going from one page to another in AJAX?</p>
<p>Put the following code in your head section:</p>
<pre class="brush: xml;">

&lt;head runat=&quot;server&quot;&gt;
        &lt;meta http-equiv=&quot;Page-Enter&quot; content=&quot;BlendTrans(Duration=.05)&quot; /&gt;
        &lt;meta http-equiv=&quot;Page-Exit&quot; content=&quot;BlendTrans(Duration=.05,Translation=0)&quot; /&gt;
&lt;/head&gt;
</pre>
<p>For more details about these meta settings, go to <a href="http://www.aim-higher.net/meta-transitions.asp">http://www.aim-higher.net/meta-transitions.asp</a>.</p>
<br />Posted in AJAX Tagged: .net 3.5, AJAX, AJAX Control Toolkit, c# <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/403/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=403&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/10/09/solve-new-page-flicker-in-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET User Control events tamed through Page_PreRenderComplete</title>
		<link>http://computermutt.wordpress.com/2009/10/09/asp-net-user-control-events-tamed-through-page_prerendercomplete/</link>
		<comments>http://computermutt.wordpress.com/2009/10/09/asp-net-user-control-events-tamed-through-page_prerendercomplete/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 20:36:38 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[AJAX Control Toolkit]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Development Patterns]]></category>
		<category><![CDATA[Page_PreRender]]></category>
		<category><![CDATA[Page_PreRenderComplete]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=382</guid>
		<description><![CDATA[Something that has been bothering me for a really long time is now under control thanks to a blog post in the .NET Geek&#8217;s Blog entry on Understanding the Page Life Cycle in ASP.NET.  In a nutshell, here is the issue.  I prefer to create user controls that wrap standard .NET controls and then put [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=382&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Something that has been bothering me for a really long time is now under control thanks to a blog post in the .NET Geek&#8217;s Blog entry on <a href="http://kiransalke.wordpress.com/2009/06/27/understanding-the-page-life-cycle-in-asp-net/">Understanding the Page Life Cycle in ASP.NET</a>.  In a nutshell, here is the issue.  I prefer to create user controls that wrap standard .NET controls and then put role enabled and other code into the controls.  That code determines if the control makes it self visible or disabled along with some other nice to haves.</p>
<p>The problem is that when a page first draws and fires off its events, the user control events follow, and if I come into the page wanting a button to be disabled in certian instances, the user controls resolve their states after the page.  So if I have a button in a user control and expose its Enabled property through a get/set variable, I can never make it stick when the page first draws.</p>
<p>In the source code below, I am using the Page_PreRenderComplete event to test for page state and call an appropriate method.  In this case the PrepUIforAdd is called and it disables a number of buttons as well other things.  If I called PrepUIforAdd in the Page_PreRender event, the buttons would never stay disabled.  But calling it in the Page_PreRenderComplete event will result in the outcome I want when the page displays.</p>
<pre class="brush: csharp;">
		/// &lt;summary&gt;
		/// PreRender is complete
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;
		/// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;
		protected void Page_PreRenderComplete( object sender, EventArgs e )
		{
			if ( !Page.IsPostBack )
			{
				ucErrorMessage.Clear();

				switch ( this.CurrentPageState )
				{
					case PageState.Add:
						{
							PrepUIforAdd();
							break;
						}
					case PageState.Edit:
						{
							PopulatePersonInfo();
							PopulateLinkedRoles();
							PopulateUnlinkedRoles();
							break;
						}
				}

				this.ManagePersonTabContainer.ActiveTabIndex = 0;
			}
		}

		/// &lt;summary&gt;
		/// Preps UI for adding a person
		/// &lt;/summary&gt;
		private void PrepUIforAdd()
		{
			this.txtPersonID.Text = (PersonIDConstant.Everybody.ToInt()).ToString();

			this.txtLastName.Text = string.Empty;
			this.txtFirstName.Text = string.Empty;
			this.txtLogin.Text = string.Empty;
			this.txtPassword.Text = string.Empty;
			this.txtInceptionDate.Text = string.Empty;
			this.txtLastModifiedDate.Text = string.Empty;
			this.txtLastModifiedByPersonName.Text = string.Empty;
			this.ddActive.YesNoID = 1;
			this.ddDeleted.YesNoID = 0;

			lbRolesAvailable.Clear();
			lbRolesSelected.Clear();

			this.bDelete.Enabled = false;
			this.bNew.Enabled = false;
			this.bResetPassword.Enabled = false;
			this.bRoleLink.Enabled = false;
			this.bRoleUnlink.Enabled = false;

			ddEmailType.Clear();
			List&lt;EmailCollection&gt; dt = GetCachedEmailList();
			if ( this.ErrorLevel == Status.Success )
			{
				ddEmailType.DataSource = dt;
				ddEmailType.DataTextField = &quot;EmailTypeName&quot;;
				ddEmailType.DataValueField = &quot;EmailTypeID&quot;;
				ddEmailType.DataBind();
			}

			this.txtEmail.Text = GetCachedEmailAddress( PersonIDConstant.Everybody.ToInt(), ddEmailType );
		}
</pre>
<br />Posted in AJAX, Programming Tagged: .net 3.5, AJAX Control Toolkit, c#, Development Patterns, Page_PreRender, Page_PreRenderComplete <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/382/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=382&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/10/09/asp-net-user-control-events-tamed-through-page_prerendercomplete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>
	</item>
		<item>
		<title>Security Exception when using AJAX Control Toolkit on Server 2008</title>
		<link>http://computermutt.wordpress.com/2009/10/02/security-exception-when-using-ajax-control-toolkit-on-server-2008/</link>
		<comments>http://computermutt.wordpress.com/2009/10/02/security-exception-when-using-ajax-control-toolkit-on-server-2008/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 00:50:42 +0000</pubDate>
		<dc:creator>Mike Malter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[Application Pool]]></category>
		<category><![CDATA[AspNetHostingPermission]]></category>
		<category><![CDATA[AJAX Control Toolkit]]></category>

		<guid isPermaLink="false">http://computermutt.wordpress.com/?p=370</guid>
		<description><![CDATA[I am using the AJAX Control Toolkit for its tab UI and my compile and link cycles came and went without incident on my Vista development machine.  However when I deployed to our integrated unit test environment on Server 2008, I got the following error when accessing the page with tabs: System.Security.SecurityException: Request for the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=370&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am using the AJAX Control Toolkit for its tab UI and my compile and link cycles came and went without incident on my Vista development machine.  However when I deployed to our integrated unit test environment on Server 2008, I got the following error when accessing the page with tabs:</p>
<p style="padding-left:30px;">System.Security.SecurityException: Request for the permission of type &#8216;System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#8242; failed.  Here is a screen shot for reference.</p>
<p><img class="aligncenter size-full wp-image-372" title="SecurityException" src="http://computermutt.files.wordpress.com/2009/10/securityexception.png?w=670&#038;h=746" alt="SecurityException" width="670" height="746" /></p>
<p>I did a lot of checking and I found articles that involved accessing the AJAX Control Toolkit on a different machine, but that was not my issue.  After publishing via Visual Studio to our server, all dll&#8217;s were in their normal folders.</p>
<p>The solution was to change one of the defaults on the application pool for this website.  The value is under the Process Model section in Advanced Settings and is Load User Profile.  By default it is set to false which will emulate IIS6 behavior of not loading the user profile for the application pool identity.  Setting it to true solved the problem.</p>
<p><img class="aligncenter size-full wp-image-374" title="TheFix" src="http://computermutt.files.wordpress.com/2009/10/thefix.png?w=545&#038;h=970" alt="TheFix" width="545" height="970" /></p>
<p>That was it.  Make sure you recycle your application pool and restart your web site.</p>
<br />Posted in AJAX, IIS, Programming Tagged: AJAX Control Toolkit, Application Pool, AspNetHostingPermission, c#, IIS7, Visual Studio 2008, Windows Server 2008 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/computermutt.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/computermutt.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/computermutt.wordpress.com/370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=computermutt.wordpress.com&amp;blog=7275350&amp;post=370&amp;subd=computermutt&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://computermutt.wordpress.com/2009/10/02/security-exception-when-using-ajax-control-toolkit-on-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikemalter</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2009/10/securityexception.png" medium="image">
			<media:title type="html">SecurityException</media:title>
		</media:content>

		<media:content url="http://computermutt.files.wordpress.com/2009/10/thefix.png" medium="image">
			<media:title type="html">TheFix</media:title>
		</media:content>
	</item>
	</channel>
</rss>
