by Yogesh | May 17, 2016 | Asp .net MVC, Entity Framework Tutorial
Hi, In this blog I am writing sample code to store file name and path into database table using Entity framework code first approach. Download Source Code Step: 1 First Create Controller named Home Controller . Step 2: Create Index.cshtml view into Index Action of...
by Yogesh | May 11, 2016 | Asp .net MVC
Data Passing techniques from a controller to View. View Data and View Bag are Data Dictionary objects. ViewData: View Data is accessible using string key value and need typecasting. ViewBag: Dynamic type property, Doesn’t require typecasting TempData: TempData...
by Yogesh | Apr 27, 2016 | Asp .net MVC
Step1: Create new MVC Project. Step2 . Create Database Table . In this example I created a table “categories” which have three fields CategoryId int primarykey CategoryName varchar(50) IsSelected bool Step 3: Create connectionstring in web.config. Step 4:...
by Yogesh | Apr 27, 2016 | Asp .net MVC
Step1: Create new project. Step 2. Create controller ‘PopulateUsing_Code’ in controller folder. Note: SelectList create a list of items where user can select one item out of them. using System; using System.Collections.Generic; using System.Linq;...
by Yogesh | Apr 27, 2016 | Asp .net MVC
Step1 : Create Model Class – Right click on models folder and add class , give its name Employee using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace FirstExample.Models { public class Employee { public int empid {...
by Yogesh | Apr 27, 2016 | Asp .net MVC
What Is ASP.NET MVC? The Microsoft ASP.NET MVC framework is Microsoft’s newest framework for building web applications. The ASP.NET MVC framework was created to support pattern-based software development. In other words, the framework was designed to make it easier to...