using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using MVC1.Models; namespace MVC1.Controllers { public class customer { public string customername { get; set; } public string address { get; set; } public string phone { get; set; } public override string ToString() { return this.customername + "" + this.address + this.phone; } } public class employee { public string Firstname { get; set; } public string LastName { get; set; } public int budget { get; set; } } public class TestController : Controller { public ActionResult GetView() { employee emp = new employee(); emp.Firstname = "KARAN"; emp.LastName = "Kumar"; emp.budget = 30000; ViewData["employee"] = emp; return View("View"); } public customer Getcustomer() { customer cus = new customer(); cus.customername = "AMAN"; cus.address = " From Srilanka "; cus.phone = " 456478546"; return cus; } } }
using MVC1.Models;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)