Interested in Sitecore?

Apply for our Mentorship Program by emailing your resume to chris.williams@techguilds.com. Check out our ASP.NET QuickStart and C# QuckStart Libraries. Below is my latest articles.

Wednesday, January 23, 2008

Setting User Control Properties in Repeaters

The way microsoft parses this is kind of silly but you need to ensure that you use a single quote to wrap your property values. You CANNOT place any text between the ' and < % or it will fail.

'< % # String.Format( "xsl/nav/{0}_config.xml" , DataBinder.Eval(Container.DataItem, "MenuItem_Name" )) % >'

Friday, December 14, 2007

Could not load file or assembly Access is denied

Microsoft in its wisdom does some silly things. Sometimes some machines will have this set
and other machines not by default. In any case, if you do not have this set it will not allow you
to include projects inside another tfs project.

This may also cause this to occur in other circumstances. If you get this error here is the solution.

  • Use windows explorer to go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  • Right click on the Temporary ASP.NET Files and click properties
  • On the securities tab give User full control

See article below:

Could not load file or assembly Access is denied

http://blogs.msdn.com/sayanghosh/archive/2007/04/21/solution-to-could-not-load-file-or-assembly-or-one-of-its-dependencies-access-is-denied.aspx

Hope this article is helpful. If you run across any issue that you fixed or found a link to a useful solution or tip email me at chrisw_88@hotmail.com or susan@clinchportal.com

Saturday, November 17, 2007

Subsonic - All your Databases Belong To Us

Recently a colleague of mine introduced me to an amazing technology. Subsonic is a tool that integrates closely with Visual Studio 2005 and will generate an object model for your database at compile time based on the database connection in your web.config.

This greatly simplifies your code as all the connection logic, proc calls with types etc all disappear into a couple lines of code. Its amazing. You should really look into it. I have provided a couple links here to get you started.\\

Here is the main site for the project: http://www.subsonicproject.com/
You will also want the tools that integrate with Visual Studio 2005 available at:
http://www.codeplex.com/subsonictools

If you have any cool links about subsonic post comments here with them or email them to me at chris@clinchportal.com or chrisw_88@hotmail.com

Thursday, September 20, 2007

Enumerating SQL Servers from .NET 2.0

I ran into a situation where I was not sure of the name of the SQL Server I would be using on a hosted site. I found this code that helped to find a list of them all.

http://dotnetslackers.com/SQL/re-20320_Enumerating_SQL_Servers_from_NET_2_0.aspx

Hope this helps you too.

Thursday, August 9, 2007

Name/Value Collections

I noticed a few people are looking for information on name/value collections so I did a search and have posted a few links I have found here:

Name Value Collection Example: http://www.dotnet247.com/247reference/System/Collections/Specialized/NameValueCollection.aspx

How to convert NameValue Collection when using ViewState http://www.thescripts.com/forum/thread114883.html

name value collection in a web service:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=188315&SiteID=1

How this changes in Orca:
http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx

Friday, June 22, 2007

Issue Downloading Orcas

I tried downloading Orcas from http://www.microsoft.com/downloads/details.aspx?FamilyID=5d9c6b2d-439c-4ec2-8e24-b7d9ff6a2ab2&DisplayLang=en but part 5 seems to be corrupt.

I tried the Microsoft online Chat but was told to call tech support that told me to go to support.microsoft.com still no luck.

If anyone actually has a working version of this part or an alternate download for the alpha please email me at chrisw_88@hotmail.com

For now, I am trying out the express edition at:

http://msdn.microsoft.com/vstudio/express/future/default.aspx

I am actually trying to play with SilverLight so I am hoping that the Web Developer version works with it.

Please pass this on to all the C# developers you know. For more information or if you have any tips, tricks, events that you think other C# Guild members would benefit from, please email me at chrisw_88@hotmail.com

Wednesday, April 18, 2007

Top 7 reasons C# is better than VB.NET

I know this is preaching to the converted but in case your boss or some other developers you know are still stuck on VB.NET. Here is a list of reasons why C# is better than VB.NET.


  1. In C# the line ends when I type the semicolon. Allowing you to write all your code on one line of the need is required
  2. Features for VB.NET such as MVC are written and available in C# first then VB.
  3. Most third party control libraries that supply source code are in C# so any bug fixes you need to make will require C# coding
  4. Comments in C# are just better. Its easier to read them when not using Visual Studio
  5. Microsoft codes a majority of their stuff in C#
  6. You can more easily access the API from C#. No need for Declare statements
  7. Most C# developers can code VB but less VB developers can code C#.