1. Border issue when migrating to .net 4.5 framework

    When you convert existing asp.net project to 4.5 framework , you will notice that all the UI elements have blue border around them

    image

    Making these changes in web.config will solve the problem

    <pages enableSessionState=”true” enableViewState=”true” enableViewStateMac=”true” validateRequest=”true” viewStateEncryptionMode=”Always” controlRenderingCompatibilityVersion=”3.5” clientIDMode=”AutoID”></pages>

    and

    <compilation defaultLanguage=”c#” debug=”true” batch=”false” targetFramework=”4.5” >

     

  2. Best way to share bookmarks and favorites across all devices - Pocket

    In today’s day and age we no longer keep our files and resources on one computer. I have 3 laptops, 2 smart phone and tablet. I have been looking for a good intuitive service which can share all my bookmarks across all these devices. Finally I found pocket, this app is amazing. These guys were previously known as “Read it later”. They have amazing iphone, ipad app and very cool chrome plug-in.   

                                         

     

  3. Visual studio 2012 releases, its all about Windows 8

    http://blogs.msdn.com/b/jasonz/archive/2012/08/15/visual-studio-2012-and-net-framework-4-5-released-to-the-web.aspx

    Inbuilt support for

    • Windows 8 development
    • Windows 8 App development
    • Azure development
    • AJILE process development like sprint methods
    • 3d game development
    • Code enhancement support
    • Responsive UI development
     
  4. Elon musk on next big 3 Ideas he may want to disrupt

    - Super sonic electric jet with vertical landing
    - Magnetic fusion
    - Hyperloop

    (Source: spaceindustrynews.com)

     
     
  5. Dreamers & Realists

     

  6. ""A ‘no’ uttered from the deepest conviction is better than a ‘yes’ merely uttered to please, or worse, to avoid trouble." - Mahatma Gandhi"
    — (Good read in the words of his grand son Arun Gandhi)

    (Source: blogs.hbr.org)

     
  7. Change Target Framework of all the projects automatically

    Recently I had a need to change all my project’s target framework to 4.0. Usually you can just right click on the project and change this by going in to properties. I needed to do this for 34 project within a single solution file. After googling I landed on an article by Scott dorman who has written nice macro to do this job automatically. 

    Change TargetFramework for all the projects in Visual Studio 2010
    http://www.codeproject.com/Articles/74805/Visual-Studio-2010-and-Target-Framework-Version

    Download Macro project from Here
    https://skydrive.live.com/?cid=93D618D639EC9651&id=93D618D639EC9651%21317

     

  8. SSRS and Columns from Dynamic SQL

    In SSRS when you bind a stored proc, it does not always auto populate the column headers. You may end up adding all the columns manually. There is a quick work around for this.

    In your stored proc, use EXEC(” your sql query”) instead of storing the text in Variable and then executing the variable. SSRS plays nice if all your columns are laid out in your EXEC statment.

    For example this approach will not detect col1 and col2 in SSRS

    — Stored proc
    Declare @sql varchar(max)
    SET @sql = ”Select col1,col2 from table’
    exec @sql

    This will

    — Stored proc
    EXEC(‘Select col1,col2 from table’) 

    Reference:
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c3c6bc0d-728c-4a6e-abeb-2ea961f38e44

     

  9. Left hand comparison: Better way to write your IF condition

    In my daily routine, I use C# as the main language to code. Those from C or C++ world may know what I am talking about.

    Try this in your C# code

    bool flag1 = true;
    if(flag1 = false)
    {
    Console.WriteLine(flag1);
    }
    Technically this should give you error (Tested in VS 2010, Framework 4.0) but it does not. Instead of comparing flag1 to false , code will assign false value to flag1. This will always be true and visual studio compiler will never give you error. Note: This is only true for Boolean values.

    This is called right hand comparison. Instead I try to follow Left-hand comparison
    (http://en.wikipedia.org/wiki/Coding_conventions#Left-hand_comparisons) in which you always put Value on the left hand side of the variable to compare. i.e.if ( false = flag1) then …

    This code will always give you compile time error so there is no scope of accidental assignment error.

     
  10. Microsoft announces “Surface” tablet. I got the sense from Engadget’s blog that this tablet’s cover is a keyboard (cool!!) and the tablet background changes to whatever color keyboard you attach. That is neat :)