Difference between Html.RenderPartial vs Html.Partial vs Html.RenderAction vs Html.Action in MVC
In this post, we are going to discuss about Html.RenderPartial vs Html.Partial, Html.RenderAction vs Html.Action. Let we split this stuff in two ways based on binding the static and dynamic content like Render partial and Action Partial
Difference between return View() ,return Redirect() and return RedirectToAction() in MVC
return View() : It commend to generate HTML to display for the required view and render/send it to the browser Example : public ActionResult Index() { UserDetailModel obj = new UserDetailModel(); obj.CountryDetail = new List<Country>()
Different way to call controller from view using MVC Razor
Different way to call controller from view Syntax @Html.Action("action", "controller", parameters) Method : 1 @using (Html.BeginForm("Save","ControllerName", FormMethod.Post)) { @Html.TextBoxFor(model => m.Name) <input type="submit" value="Save" /> } Note : "Save" be the name of the
How to use WebGrid from PartialView using Razor
WebGrid is used to display the data with paging and sorting. In this article, we will discuss about how to load the data to webgrid and would like to explore how can to use default paging
How to create simple WebGrid in MVC (Razor engine)
Create simple WebGrid in MVC (Razor engine) Controller public class WebGridExampleController : Controller { public ActionResult Index() { UserDetailModel obj = new UserDetailModel(); obj.CountryDetail = new List<Country>() { new Country() { CountryId = 1, CountryName
Getting Selected text/value using jquery in MVC Razor
In this post, we are going to discuss how to get the drop down selected value using Asp.Net MVC razor and jquery. Model : A simple Model which has Country ID, Country Name and SelectedCounty. public
MVC Razor : How to get the value of Html.DropDownListFor using controller
In this post, we are going the discuss about how to get the value from the Html. DropDownListFor razor control using a controller. View [crayon-672aa8deee269638922214/] Model : [crayon-672aa8deee26e605120510/] Controller : [crayon-672aa8deee270004661770/] OutPut [
How to use cascading DropDown in MVC Razor
How to use cascading DropDown in MVC Razor Model [crayon-672aa8deee3a2522298272/] Controller: [crayon-672aa8deee3a6193116208/] [crayon-672aa8deee3a8558132314/] View [crayon-672aa8deee3a9201032321/] Output Before Selecting Country: After Selecting it will populate list of states belong to Country India [/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]