I have give code for saving Action...in this ,After save the data some successfull message has to
display .. in this code i had wrote return success in that place i passed one message you seen.that message only display after am saving my page ....please help me if anyone know this please share the code please help me
public ActionResult RoundOff(RoundoffSetting model)
{
try
{
var item = (from a in wallet.RoundoffSettings where a.CompanyId == CompanyId select a).FirstOrDefault();
if (item == null)
{
item = new RoundoffSetting();
item.CompanyId = CompanyId ?? 0;
item.CreatedBy = User.Identity.Name;
item.CreatedDate = DateTime.Now;
wallet.RoundoffSettings.Add(item);
}
else
{
item.ModifiedBy = User.Identity.Name;
item.ModifiedDate = DateTime.Now;
}
item.RoundingType = model.RoundingType;
item.RoudingValue = model.RoudingValue;
wallet.SaveChanges();
return Success(M("RoundOffSaveSucess"));
}
catch (Exception e)
{
log.Error("Failed to save RoundOff", e);
return Error();
}
}

Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 6, 2016, 1:37 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 6, 2016, 3:09 AM EDT
// DELETE [Authorize(Roles = "news-admin")] public ActionResult Delete(int id) { var ArticleToDelete = (from a in _db.ArticleSet where a.storyId == id select a).FirstOrDefault(); _db.DeleteObject(ArticleToDelete); _db.SaveChanges(); TempData["message"] = "The article has been deleted."; return RedirectToAction("Index"); }Krishna Rajput SinghRank #605 · 4K reputationPosted Apr 6, 2016, 3:41 AM EDT
mari muthuRank #8,962 · 213 reputationPosted Apr 6, 2016, 2:03 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 6, 2016, 4:56 AM EDT