Author Archives: SheldonS

Render a View or Template Using JavaScript

This post builds off my previous one ASP.NET MVC Model Binding to a List.  This post is about how to render a partial view when you make an AJAX call.  This will also work with an EditorTemplate or a DisplayTemplate.  I personally recommend using a partial view as you can take advantage of model binding for your templates better, as you will see, doing this from an AJAX call is a little different.

Read the rest of this entry

ASP.NET MVC Model Binding to a List

Microsoft’s implementation of MVC is very nice; especially the Model Binding feature.  What happens if you have a List<T> of objects that are part of your model?  Can you still use the awesomeness that is Model Binding?

Read the rest of this entry

Telerik Kendo Menu and Styling

This is more of a note to myself than anything else.  I am trying to create a new MVC project using our Telerik subscription.  I wanted to try their menu, but noticed it wasn’t styled properly.  Nothing like in their demo, it was huge.

I did some searching on the Internet to no avail, so I fired up Opera’s web tools and started tooling around.  I noticed my menu was using a non-Telerik style, but one of the default ones found in Site.css.  Specifically it was using ul #menu.

I had to laugh at myself.  Telerik’s menu renders as a UL, like most menus these days.  Silly me used the name menu.  That is why that style was being applied.  I changed the name to masterMenu and it looked as advertised.

LINQ VS the NULL Monster

The Problem

I was working on a task, something that seemed just way too simple.  I needed to filter a List<T> on one of the values in the objects in the List.  I put my LINQ in place and started the tests.  This change needed to happen in different areas, but it was simple reuse of code and not a big deal and so was really only two places.  The tests returned the error about an object not set to an instance of an object.  I really don’t like that error.

Read the rest of this entry

Open a Unity Project Using Right Click

Today I am attending an MVA on Building Windows 10 Games with Unity 5.  It is a lot of information and I will definitely have to re-watch some modules when the recording is released.

One of the presenters, Adam Tuliper, created a nice registry entry for Windows machines to open a Unity project with a right click.  For those that don’t know, Unity is folder based; not solution based like a Visual Studio project.  His registry script allows you to right click on a folder and open it as a Unity project.

Using on an Android Phone

How to Use on an Android Phone

I have been using Android phones for a long time now.  I am also not the type to upgrade from a perfectly working phone just because the latest and greatest has come out.  Recently we moved to Verizon’s Edge plan and upgraded our phones, yay.  After using an HTC Droid DNA for so long and previous Android phones I found some things lacking; mainly the lack of integrating with my account.

Read the rest of this entry

NuGet and Package Does Not Exist in Source


I had been working on a solution that contained several projects.  Due to company conventions I had to rename the projects, name spaces, and change the folder structure.  Things seems to work, builds were good and the applications would run without error.

the problem occurred once I checked it all into TFS, and made everyone target the same framework.  Some how I was getting an error about Entity Framework and that I needed to reinstall it.

I ran the command for each project and both times would receive a message like this one;

Skipped Reinstalling package ‘Name Here’ because the package does not exist in the package source.

My Fix

My fix was simple.  I went to the project and managed its packages.  I noticed that Entity Framework was not even installed.  I thought that kind of odd as I assumed the Update-Package -reinstall would have done it, but I clicked the install button.

Everyone is happy now.

Visual Studio 2015 Window Layout

I have to admit I was wrong about the significance of the new Window Layout functionality in Visual Studio 2015.  As it turns out I really have been using this feature.

Window Layout

Window Layout

Visual Studio Safe Mode to the Rescue

Today while using Visual Studio 2015 CTP 6 I encountered a problem.  It kept crashing.  I know earlier today I had installed several extensions; two of which did not come from Microsoft or Microsoft employees.  Naturally I suspected some extensions.

Command Line to the rescue.  You simply start Visual Studio from the command line with the flag to start in safe mode.  Once it comes up you can remove those suspect extensions.

Visual Studio 2015 Break Point Intellisense

I know we have intellisense in Visual Studio 2013 for the break point Condition, but we do not have it for the Action.  I was toying around with 2015 and noticed we now have it for the Action as well.

This is very useful for creating output messages to the debugger window.  In the screen shot below I have an object called myObject.  This object has three properties, an Id, a Name, and a CreatedDate.

Point intellisense

VS 2015 Break Point intellisense