My readings in 2015 week 7

  1. A performance checklist to review your ASP.Net MVC application.
  2. Do you know DataTable, Linq and Tuple, which one perform sorting faster?read thsi post Sorting list using DataTable vs. Linq vs. Tuple; and you may also like this article, Tuple vs. KeyValuePair.
  3. A good example to know how to animating with pseudo-elements.
  4. Nice and simple technique to use CSS Marking for textures.
  5. Ana Tudor shared her sliders using input type=”range”; Nice implementation, it will great if no js is needed.
  6. Start learning more about ES6, Variables and scoping in ECMAScript 6.

Strange NullReference Exception for controls shown in Master page

Everyday the first thing I do before any dev work is to get latest code.  This morning the code updated, my web application doesn’t work; and started to give me a NullReferenceException complaining about a line which assign a text to a hyperlink control Page_Load event method.  It is strange, right? All controls should be initialized after Page_PreInit.  The control get complained is added recently.  And it works fine when I am running debug mode.

I tried to resolve it by:

  1. Do a clean build.
  2. IIS reset.
  3. Restart application pool.
  4. Restart machine.

However I have no luck to solve it.  Finally I think the compiled markup may be in an invalid state.  So what I did is put a space of the control id and then remove it; rebuild and test it again.  And it is fixed.  After investigation, it is about the cache of my master page is invalid (no idea why out-of-sync).  The solution is either making some changes on the markup page to trigger re-generation or you should go to corresponding ASP.Net temporary file folder (e.g. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root) and delete all folders.

Hope this will help!!

My readings in 2015 week 6

  1. Simple post to show you how to encrypt/decrypt with .Net.
  2. How to implement publisher/subscriber patterns in C#.
  3. Read Gooey effects from CSS Tricks. You will definitely like this menu, it is so cool to do it by SVG filters.
  4. It is also good to understand your customers. This post will show you know to measure your site’s responsive breakpoints usage.
  5. Mobile animation, a sharing about how to make animation great on mobile web.
  6. Destructing and Recursion in ES6.  It is good to know how to do destructuring in JavaScript.
  7. Review this list of OWASP Top 10 Application Security Risks and see how secure your website does.