Difference between MVC application and MVC WEB API Application

•Web API does not share the Model-View-Controller design of MVC •Web API directly renders the resulting model object as the response •Base Class is ApiController where as in MVC we have Controller •Methods in the controller return raw objects rather than views (or other action helper objects) •Web API controllers by default dispatch to actionsContinue reading “Difference between MVC application and MVC WEB API Application”

MVC -SelectedList

Today we will see a small example of how to use SelectedList. It comes under the namespace System.Web.Mvc. This list basically helps you to represent a list that let user to select item. To start with we will create a Model say SelectListExampleModel.cs using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace SubmitTest.Models{ public class SelectListExampleModel { publicContinue reading “MVC -SelectedList”

MVC3- PartialViewResult as a Modal Dialog

Today we will see how we can display partial view result as a modal dialog The partial view @model ReloadPartial.Models._UserModel @using (Html.BeginForm(“Validation”,”Home”, FormMethod.Post, new { id = “UsrValidation” })) { @Html.ValidationSummary() @Html.Raw(“User Name:”) @Html.TextBoxFor(m => m.UserName) @Html.Raw(“Email:”) @Html.TextBoxFor(m => m.Email) } Now lets see the controller  implementation public PartialViewResult Validation(_UserModel model) { ModelState.Clear(); //important toContinue reading “MVC3- PartialViewResult as a Modal Dialog”

Kendo UI :Web development framework- Part 2

The MVVM model is most popular now a days . Here we will see with the sample example the use of MVVM in MVC. To start with  MVVM  we need to first create a View Model, A view model is an observable object. This object has properties and methods. Each property will be bound to somethingContinue reading “Kendo UI :Web development framework- Part 2”