[HttpGet] public ActionResult Index(int id) { var model=_db.nezam.tolist(); return view(model); }
@using(Html.BeginForm()){ <input type="text" name="cap" /> <input type="submit" value="OK" /> }
[HttpPost] public ActionResult Index(string cap) { string st=HttpContext.Session["captcha"].ToString(); if (cap == st) { return Content("true"); } return View(?); }
System.NullReferenceException: Object reference not set to an instance of an object.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)