by Yogesh | Mar 10, 2018 | Asp .net MVC, Entity Framework Tutorial
In this example, I am going to create two tables(MainMenu, SubMenu) Database Script for database tables CREATE TABLE [dbo].[MainMenu]( [id] [int] IDENTITY(1,1) NOT NULL, [menuname] [varchar](max) NULL, [menuurl] [nvarchar](max) NULL, CONSTRAINT [PK_MainMenu] PRIMARY...
by Yogesh | Feb 27, 2018 | Asp .net MVC, Entity Framework Tutorial
.cshtml @model RegistrationForm.Models.Employee @{ ViewBag.Title = "Create"; } Create @using (Html.BeginForm()) { @Html.AntiForgeryToken() Employee @Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.LabelFor(model => model.EmpName,...
by Yogesh | Feb 25, 2018 | Asp .net MVC, WebApi Tutorial
Install Microsoft.AspNet.WebApi.Cors using nuget package manager console Make Changes at webapi.config var enableCorsAttribute = new EnableCorsAttribute(“*”, “*”, “*”); config.EnableCors(enableCorsAttribute); Create web api 2...
by Yogesh | Jan 20, 2018 | Asp .net MVC
In this example, I demonstrate how we can implement client and server side data annotation in asp.net MVC.The major issue in checkbox generally occurred in client-side validations here client and server side validations are working fine using jQuery I just create an...
by Yogesh | Oct 22, 2017 | Asp .net MVC
Example of RadioButtonfor helper with entity framework HtmlHelper class include two extension methods to generate a element in a razor view: RadioButton() and RadioButtonFor(). RadioButton() method Signature: MvcHtmlString RadioButton(string name, object value, bool...
by Yogesh | Oct 22, 2017 | Asp .net MVC, Entity Framework Tutorial
Example of Checkboxfor helper with entity framework Html helper class have two methods to generate checkboxes( Checkbox() –Loosely Typed MvcHtmlString CheckBox(string name, bool isChecked, object htmlAttributes) Checkboxfor() –Strongly Typed (It...