Guest User

Untitled

a guest
Feb 23rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public bool isDeleted { get; set; }
  2.  
  3. [HttpPost]
  4. [ValidateAntiForgeryToken]
  5. public ActionResult Create([Bind(Include = "srfId,Name,devId,clientId,isDeleted")] testSRF testSRF,)
  6. {
  7. if (ModelState.IsValid)
  8. {
  9.  
  10. //code here to set default value of isDeletedValue even w/o the html.Dropdowonlist (if possible)
  11.  
  12. db.testSRFs.Add(testSRF);
  13. db.SaveChanges();
  14. return RedirectToAction("Index");
  15. }
  16.  
  17. ViewBag.devId = new SelectList(db.device1, "devId", "plateNo", testSRF.devId);
  18. return View(testSRF);
  19. }
Add Comment
Please, Sign In to add comment