How to not hardcode AspNetDevelopmentServerHost attribute when unit testing

December 5, 2011

By default, whenever you have VS2010 generate a new unit test for a web method (an MVC controller in my case), it creates a hard-linked file path in the "AspNetDevelopmentServerHost" attribute. This may work fine if you’re the sole developer and code on only one machine, but what about when you work on a team [...]

0

“The property is read only” Error Using RIA Services

July 13, 2011

If you’re trying to modify the property of an object automagically generated from RIA Services within a Silverlight application and you’re getting a runtime error indicating that the the property is read only, here’s a simple fix. Simply add the attribute “[Editable(true)]” from System.ComponentModel.DataAnnotations at the top of the field that you’d like to be [...]

0

Invalid object name ‘dbo.xxx’ using MVC3 and SQL Server

May 10, 2011
Tags: , ,

When working through the Movies tutorial on the ASP.NET website, I decided that it’d be fun to try to switch the data provider from SQL Compact to the full version of SQL Server 2008. In preparation for the move, I created a new (blank) database and gave the appropriate permissions to my test account. However, [...]

5

Canceling AutoPostBack for Asp.Net DropDownList

January 25, 2010
Tags: ,

In my most recent project, I decided to prompt the user before doing a post back when a DropDownList changed. In order to do so, you need to add an “onchange” event to your DropDownList. It should look something like: onclick=”if(!SomeFunction(this)) return false;” Some Notes: “SomeFunction” is a javascript function that returns true or false [...]

0

Which Version of Java: 32-bit or 64-bit?

October 18, 2008

Occasionally, I pretend to be a Python developer.  Thus far, my IDE of choice has been PyDev + Eclipse.  Recently, I did a few minor upgrades to my development box that allowed my to upgrade from Windows XP to Windows Vista 64.  Before I could begin using Eclipse, I needed to install the latest version [...]

0