Monday, December 16, 2013

Setting the context in an jQuery ajax call

When an jQuery ajax call is made, the .done method has a different value of $(this)

Friday, December 13, 2013

MVC with [HttpGet] and JsonResult throws exception


For security purposes, MVC prevents json results from being returned with a http get. However, there are instances when that behavior is desired and this is how it's done.

Thursday, December 12, 2013

Create a stored procedure in SQL Server 2008

The following is the default template created by SSMS when selecting new stored procedure.

I'm not exactly sure why I added this entry since I'm unlikely to forget how to select a context menu, but here it is anyway.

Wednesday, December 11, 2013

Setting up IIS, Error 500.19


When you first set up IIS on windows 7, you can get a 500 error. Things rarely work the first time for me.

Tuesday, December 10, 2013

What is SSIS? SQL Server Integration Services?


Microsoft Integration Services is a platform for building enterprise-level data integration and data transformations solutions. You use Integration Services to solve complex business problems by copying or downloading files, sending e-mail messages in response to events, updating data warehouses, cleaning and mining data, and managing SQL Server objects and data.

The packages can work alone or in concert with other packages to address complex business needs. Integration Services can extract and transform data from a wide variety of sources such as XML data files, flat files, and relational data sources, and then load the data into one or more destinations.

Source: http://technet.microsoft.com/en-us/library/ms141026.aspx

Monday, December 9, 2013

What is TempData, ViewBag, and ViewData?



  • TempData: A typical use for TempData is to pass data from one action method to another action method, via a redirect. After the desired object is read from TempData, the ASP.NET runtime disposes of the object in the TempData dictionary
  • ViewBag: stores data that will be used in the corresponding view
  • ViewData: Same as ViewBag, but ViewBag is dynamically typed. ViewData is the underlying mechanism for ViewBag

Friday, December 6, 2013

DataMigration in MVC and EF

I tinkered around with Data Migrations in MVC 4.0 and I have to say, It's really convenient.

Thursday, December 5, 2013

What is the execution flow in MVC .NET?

I feel like the execution flow from a request to the view is a more complicated than WebForms. Maybe it's because more of the WebForms is hidden. Or maybe it's because I never thought about it.

Regardless, this is the execution flow in MVC.NET

Wednesday, December 4, 2013

ConnectionString 1: Standard

The connection string is perhaps the most notable item in the config file. Without it, data cannot be fed to the application and, as everyone knows, data is the gasoline of applications.

Tuesday, December 3, 2013

My Bad Interview



I recently had an interview with a company that sounded like the perfect opportunity. The phone interview went fine. The call came unexpectedly after running an errand and I actually got back into my car for the interview because it was closer than the door to the house. I was relaxed and answered what was asked without difficulty. Later, I received a call from the Director of IT who said the phone interview went really well and they were looking forward to the next step which was a face-to-face interview. What could go wrong, right?