Fairnet.com - Latest published stories
2
fairs
spam fair unfair

Web 2.0 | Handling Unknown Actions in ASP.NET MVC

published 209 days, 53 minutes ago posted by farooqkaiserfarooqkaiser 211 days, 14 hours, 45 minutes ago
Thursday, August 13, 2009 4:30:26 PM GMT Tuesday, August 11, 2009 2:37:57 AM GMT
In this article, I will explore Handling Unknown Actions. A Controller.HandleUnknownAction Method gets called when a controller cannot find an action method that matches a browser request. I will implement the following method in my previous article Implementing HTTP File Upload with ASP.NET MVC. protected virtual void HandleUnknownAction(string actionName) Here is my FileUploadController class as shown below.    [HandleError]    publicclassFileUploadController : Controller    {      publicActionResult... (more)
category: ASP.NET | clicked: 3 | comment | | source: www.fairnet.com
tags: .Net 3.5, asp.net MVC
2
fairs
spam fair unfair

Web 2.0 | Entity Framework with ASP.NET MVC

published 209 days, 53 minutes ago posted by farooqkaiserfarooqkaiser 211 days, 1 hour, 10 minutes ago
Thursday, August 13, 2009 4:30:26 PM GMT Tuesday, August 11, 2009 4:12:55 PM GMT
In this article, I will explore entity framework with ASP.NET MVC. We will modify  Form validation sample that will access data layer using entity framework. We will create the following table in local database using SQL express. CREATETABLE [dbo].[tblComment](             [CommentID] [int] IDENTITY(1,1)NOTNULL,             [Name] nvarcharNULL,             [Email] nvarcharNULL,             [Comment] nvarcharNULL) Now, Right click on the Models directory and select add new item... (more)
category: ASP.NET | clicked: 2 | comment | | source: www.fairnet.com
tags: asp.net MVC, C#, Entity Framework
2
fairs
spam fair unfair

Web 2.0 | Dynamic Typing in C# 4.0

published 209 days, 53 minutes ago posted by farooqkaiserfarooqkaiser 212 days, 2 hours, 59 minutes ago
Thursday, August 13, 2009 4:30:26 PM GMT Monday, August 10, 2009 2:24:34 PM GMT
C# 4.0 introduces a new static type called dynamic. When an instance variable is defined with the type dynamic, the compiler ignores the call and won't complain. These actions are picked up at runtime. Here are comparison with C# 3.0 and C# 4.0 using Dynamic Types. Let's say I have the following code in C# 3.0     // will not work in c# 3.0        object o = "farooq";        Console.Write(o.Insert(o.Length, " Kaiser "));        // will work in c# 3.0       object o = "farooq";       str... (more)
category: ASP.NET | clicked: 1 | comment | | source: fairnet.com
tags: .net 4.0, c# 4.0
2
fairs
spam fair unfair

Web 2.0 | Named and optional parameters in C# 4.0

published 209 days, 53 minutes ago posted by farooqkaiserfarooqkaiser 212 days, 3 hours, 4 minutes ago
Thursday, August 13, 2009 4:30:26 PM GMT Monday, August 10, 2009 2:19:26 PM GMT
In this article, I will explore named and optional parameters in C# 4.0 features. Named and optional parameters are really two distinct features, and allow us to either omit parameters which have a defined default value, and/or to pass parameters by name rather than position. Named parameters are passed by name instead of relying on its position in the parameter list, whereas optional parameters allow us to omit arguments to member without having to define a specific overload matching. Let’s have a look... (more)
category: ASP.NET | clicked: 0 | comment | | source: fairnet.com
tags: .net 4.0, c# 4.0