public ActionResult Create(Hotel hotel) { //inserting Hotel if (ModelState.IsValid) { //code here } ViewBag.HotelCategoryHotelCategoryId = new SelectList(db.HotelCategories, "HotelCategoryId", "CategoryName", hotel.HotelCategoryHotelCategoryId); return View(hotel); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)