hi,
the following is giving error can you please let me know on this
using (MVC_PracticeEntities objContext = new MVC_PracticeEntities())
complete code as follows
public ActionResult Insert(FormCollection Fc)
{
using (MVC_PracticeEntities objContext = new MVC_PracticeEntities())
{
tbl_FormCollectionUse Tbl = new tbl_FormCollectionUse();
//
Tbl.Name = Fc["TxtName"].ToString();
Tbl.Mobile = Convert.ToInt64(Fc["Mobile"]);
Tbl.EmailID = Fc["TxtEmailID"].ToString();
Tbl.Address = Fc["TxtAddress"].ToString();
//
objContext.AddTotbl_FormCollectionUse(Tbl);
//
int i = objContext.SaveChanges();
if (i > 0)
{
ViewBag.Msg = "Data Saved Suuceessfully.";
}
}
return View();
}
thanks
syed
Arun ArunPosted Aug 21, 2019, 10:07 AM
Sreekanth ReddyPosted Mar 8, 2016, 12:44 AM