Monday, December 10, 2012

How to iterate an Enum in C#?

            Array values = Enum.GetValues(typeof(MyEnumType));
            foreach (MyEnumType val in values)
            {
                var enumName = Enum.GetName(typeof(MyEnumType), val);
            }

Why should not use Session variable for better performence in ASP.NET?

However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information. The second request executes only after the first request is finished. 

http://msdn.microsoft.com/en-au/library/ms178581(v=vs.100).aspx

Re-Use MVC Views Across Projects With Razor Generat

http://blog.mirajavora.com/re-use-mvc-views-across-projects-with-razor-generator
Razor-Generator-Extension

Friday, December 7, 2012

Think First, Code Later

http://24ways.org/2012/think-first-code-later/

You, or someone just like you, have been building a website, probably as part of a skilled and capable team. You’re a front-end developer, focusing on JavaScript – it’s either your sole responsibility or shared around. It’s quite a big job, been going on for months, and at last it feels like you’re reaching the end of it