Master Detail view in Asp.Net MVC

The master & detail view is particularly useful in displaying a list of records. In Asp.Net 2.0, it can be achieved by using the control of gridview and detail view. However, the page reload/post back is unavoidable when the gridview item is clicked until Microsoft Asp.Net team releases the Asp.Net AJAX in 2008, Now we are going to take a look how to implement the Master Detail view in Asp.Net MVC.

image
Continue reading “Master Detail view in Asp.Net MVC”

Advertisements

Load Json List Using Jtemplate & Asp.Net MVC

Asp.Net MVC’s controller offer a way to return in Json format. You can take the JsonReult returned from controller and populate it into the view using Jtemplate, a template engine written in jQuery way. also a perfect “client solution” to display Json data into a Asp.Net MVC View.

With this template engin in jquery, it display list of json data via ajax call so that the page does not refresh. It not only makes the user experience much better without waiting page to refresh, but also save traffic(loads faster) by returning only Json data and let the javascript to perform the rendering.

image
Continue reading “Load Json List Using Jtemplate & Asp.Net MVC”

Create A Dashboard Experience In Asp.Net MVC

In most of the time while creating a web application, a secured section for administrating the application is always needed. Something like a control panel or back end of the website(One of my client even call it a database!). No matter how you call it. You do not want to display a bunch of links when you first entered. Instead, you want to show useful data, important notifications or graphical reports using pie or bar chart before they decide where to go in the application. Therefore, a dashboard is needed for that purpose.

dashboard_aspnetmvc

Continue reading “Create A Dashboard Experience In Asp.Net MVC”

Load Google Chart by Ajax using Asp.net MVC and jQuery

If you are looking for a modern chart tool in a modern browser, you must not not to know the free one that offer by Google – Google Chart, is a HTML5/SVG technology to provide cross-browser compatibility (including VML for older IE versions) and cross platform portability to iPhones, iPads and Android. No plugins are needed. Don’t get confused by the image chart offered by Google, which was another chart tool. Now the new HTML5 Google chart provides more interaction and better rendering to users .googlechartaspnetmvc Continue reading “Load Google Chart by Ajax using Asp.net MVC and jQuery”

How to check if enter key pressed in jquery

In a user specific designed application or website, we want application start taking action without user click extra button. Especially in the scenario of search function. You want user be able to start searching when enter key is pressed on the textbox.

<input type="text" id="search" />
<script>
$('#search').keypress(function(e) {
    var keyCode = (e.keyCode ? e.keyCode : e.which);
    if(keyCode  == 13) {
        alert('Enter key pressed');
    }
});
</script>