Author Archives: Trent Jones

ByTrent Jones

Auto-Start ASP.NET Applications

Scott Guthrie has an article up on his website discussing the new auto-start feature of web applications that will be available in IIS7.5 with ASP.NET 4.0.  I just learned about this last week at the Southern Fried Road Show.

http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

ByTrent Jones

960 Grid System

I am going to try and enlist the 960 Grid System on a website I am working on.

“The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.”

http://960.gs/

ByTrent Jones

40+ open source apps and games

Here is a list of apps and some games that are very useful.  There are a few I hadn’t heard of but will soon be installing.

http://www.downloadsquad.com/2009/05/18/40-great-open-source-apps-and-games-to-trick-out-your-new-windows/

ByTrent Jones

monoTouch development kit now available for iPHone

monoTouch enables applications developed in any .net language to run on the iPhone. Significantly, monoTouch provides .net bindings to native API, allowing application developers will have access to iPhone specific functionality from within their .net applications. monoTouch integrates with both the free MonoDevelop IDE as well as Apple’s XCode toolkit

http://www.downloadsquad.com/2009/09/14/monotouch-net-development-kit-now-available-for-iphone/

ByTrent Jones

MVC, WebForms, ZeroForms

Interesting article comparing MVC vs. WebForms and a third option known as ZeroForm.

http://madskristensen.net/post/WebForms-or-MVC-What-about-the-third-option.aspx

ByTrent Jones

IE and ContentEditable Attribute

Ran into an issue today using jQuery with IE and setting ContentEditable=’true’ on a click command. First I created a div with ContentEditable set to true without jquery and ran it in IE. Ok, it’s working. Now to try and add the attribute dynamically. I removed the attribute and replaced it with this bit of javascript:

$(function(){
$("#test").click(function() {
$(this).attr({ ContentEditable: "true" });
});
});

This did not work. Even though IE would allow the Cap “C” to set to true without jQuery, it would not work in doing so dynamically. Changing to:

$(function(){
$("#test").click(function() {
$(this).attr({ contentEditable: "true" });
});
});

Works perfectly.

ByTrent Jones

Entity Framework Code Only option

.NET 4.0 and VS 2010 introduce a new feature for the Entity Framework called model first.  In addition, you will now be able to have a code only model. Written with POCOs and a simple class derived from ObjectContext and you are on the way…

http://blogs.msdn.com/efdesign/archive/2009/06/10/code-only.aspx

ByTrent Jones

Using Stored Procedures with Entity Framework

Yesterday i was attempting to use a stored procedure with the Entity Framework through the “function import” features and couldn’t get the auto-gen feature to expose the function on the Context.  The stored procedure was returning a scalar value which at this point doesn’t seem to be supported through auto-gen.  Choosing an Entity, however works fine. Further digging this morning led me to this article on the ADO.NET team blog explaining the issues with return types and stored procedures in Entity Framework.  The article also links to another great article showing how to return custom types two ways:  one way through the entity framework itself, the other through the use of extension methods.

ADO.NET Entity Framework Extensions

ByTrent Jones

Using T4 to Generate Stored Procs for Entity Framework

T4 code generation has been on my short list of things to look into but keeps getting put off as i navigate down some other endless path.  Meanwhile, I found a nice article on using T4 to generate stored procs for CRUD operations for the Entity Framework.

Entity Framework Stored Procedure Generation

Thanks David.

ByTrent Jones

Forms Authentication and Session Timeout

Ran into an issue on a website where the Session was timing out yet the forms auth ticket was still valid which was causing errors. Here is one solution:

http://dotnethitman.spaces.live.com/blog/cns!E149A8B1E1C25B14!210.entry

The GU also mentions some of this in the post and in digging through all the comments.
http://weblogs.asp.net/scottgu/archive/2005/11/08/430011.aspx