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”

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”

How to check if enter key pressed in javascript

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.

function checkEnter(e){
var keyCode = (e.keyCode ? e.keyCode : e.which);
if(keyCode == 13){
//perform action
alert(‘enter key pressed’)
}
}

[html]
<input type="text" onkeypress="checkEnter(event);" />
[/html]
[javascript]
<script>
function checkEnter(e){
var keyCode = (e.keyCode ? e.keyCode : e.which);
if(keyCode == 13){
//perform action
alert(‘enter key pressed’)
}
}
</script>
[/javascript]]

Click here to see the jquery version