Click here to Skip to main content
15,885,366 members
Articles / Web Development / ASP.NET

MVC Basic Site: Step 3 – Dynamic Layouts and Site Admin with: AJAX, jqGrid, Controller Extensions, HTML Helpers, and more

Rate me:
Please Sign up or sign in to vote.
4.96/5 (72 votes)
25 Oct 2013Ms-PL28 min read 206K   13.1K   186  
This article provides the implementation of dynamic layouts and web site administration in ASP.NET MVC4.0 by using: AJAX, jqGrid, Custom Action Results, Controller Extension, HTML Helpers, and more.
/// <reference path="jquery-1.7.1-vsdoc.js" />
/// <reference path="jquery-ui-1.8.20.js" />

$(document).ready(function (e) 
{
    //
    // Try to init the culture drop down list. 
    //
    try 
    {
        $("#_cultureDDL").msDropDown();
    }
    catch (e) 
    {
        alert(e.message);
    }

    //
    // Auto-complete the user input based on an existing attribute.
    //
    $(":input[data-autocomplete]").each(function () {
        $(this).autocomplete({ source: $(this).attr("data-autocomplete") });
    });

    //
    // Activate the DateTime picker control based on an existing attribute.
    //
    $(":input[data-datepicker]").datepicker();

});

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Romania Romania
I have about 20 years experiences in leading software projects and teams and about 25 years of working experience in software development (SW Developer, SW Lead, SW Architect, SW PM, SW Manager/Group Leader).

Comments and Discussions