TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mari muthu
NA
198
107.2k
how to display the save succeessfull message in MVC ?
Apr 6 2016 5:28 AM
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();
}
}
Reply
Answers (
5
)
In JQuery How to merge the 2 object into another object ?
What is dataset and when to use this ....?