Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool isDeleted { get; set; }
- [HttpPost]
- [ValidateAntiForgeryToken]
- public ActionResult Create([Bind(Include = "srfId,Name,devId,clientId,isDeleted")] testSRF testSRF,)
- {
- if (ModelState.IsValid)
- {
- //code here to set default value of isDeletedValue even w/o the html.Dropdowonlist (if possible)
- db.testSRFs.Add(testSRF);
- db.SaveChanges();
- return RedirectToAction("Index");
- }
- ViewBag.devId = new SelectList(db.device1, "devId", "plateNo", testSRF.devId);
- return View(testSRF);
- }
Add Comment
Please, Sign In to add comment