While working on a new ASP.NET MVC project, I had a simple objective: add a new record and refresh my View. After sifting through several sites I found several resources that lead me to accomplish my goal. I’ve compiled my result into a new sample MVC Application that I created in Visual Studio that you [...]
Archive for the ‘Web Programming’ Category
Got Surveys? An easy way to collect data from your visitors
29 Apr , 2010
For this example you will need a copy of the current version of Shadowbox. Download Shadowbox Everyone knows that advertising ideas and marketing plans can be driven by data collected from potential buyers. This inevitability has brought forth many different avenues that can be taken in order to collect data from potential buyers. Now to [...]
Using .NET 3.5 List.Distinct()
28 Apr , 2010
When I was working on a project today, I had a List of objects where I needed to grab objects that had a distinct property value (i.e. where MyObject.MyID is distinct).
I discovered the Distinct() method on the List and I had never used it before so I wasn’t sure of the syntax. After further review, I learned you can use the IEqualityComparer interface to specify how to determine if the object is distinct.
Using .NET 3.5 and Reflection to help with sorting a List
1 Apr , 2010
The other day I was looking to be able to sort a list of products (List<Product>). I was binding that list to a ListView and the client wanted to be able to sort the Products by Name (Z-A & A-Z) and by Price (Low-High and High-Low). I initially had something like this: public class SortProductsByPrice [...]
Tip: Choose which browser to debug with in Visual Studio
11 Mar , 2010
By default, Visual Studio uses Internet Explorer for debugging. If you’re looking for a way to change that, perhaps to harness the power of developer tools in Firefox or other browsers (or perhaps just because you don’t like IE), it’s pretty easy to do. Right-click your start-up project in Studio and click Browse With… Click [...]
