Articles : Page 1 of 1

  • Using QUnit with Razor Layouts

    Using QUnit with Razor Layouts

    Dec 11
    11

    Given how central JavaScript is to many modern web applications,  it is important to use unit tests to drive the design and quality of that JavaScript. But I’ve noticed that there are a lot of developers that don’t know where to start. There are many test frameworks out there, but the one I love is QUnit, the jQuery unit test framework. Most of my experience with QUnit is writing tests for a client script library such as a jQuery plugin. Here’s an example of one QUnit test file I wrote a ...


  • A Simple 2-Column Layout in Razor

    A Simple 2-Column Layout in Razor

    Aug 11
    22

    2 column layouts are rather popular on the web, and there are 1,001 ways to make them work. The approach you choose really depends on the type of content you have, and how you want images and backgrounds to work. What I'll show is the Razor _Layout and CSS to achieve the following look: The Razor _Layout file can rely on partial views to handle each of the primary sections: top, navigation, sidebar, and footer. RenderBody will produce the primary content area. <!DOCTYPE html> <html> <hea...



  • 1