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
Sheikh parvaz
NA
199
109.1k
Using Toastr notification in mvc
Apr 4 2017 3:42 AM
Hi,
I have a situation where I want to display toastr notification on successfull completetion of operation without clicking and showing.on button click it is working but i need on operation . My code is
@{
if
(TempData[
"OperationResult"
] !=
null
)
{
string alertClass =
""
;
var
operationResult = (EntryOperationOutBase)TempData[
"OperationResult"
];
if
(operationResult.OperationStatus == OperationStatus.Success)
{
//I shuold be able to call and show toastr here with below message
@operationResult.ResultMessageToShow
}
else
{
//I shuold be able to call and show toastr here
@operationResult.ResultMessageToShow
}
}
}
// Toastr is
<script >
$(document).ready(
function
() {
toastr.options = {
"closeButton"
:
true
,
"debug"
:
false
,
"positionClass"
:
"toast-bottom-right"
,
"onclick"
:
null
,
"showDuration"
:
"1000"
,
"hideDuration"
:
"1000"
,
"timeOut"
:
"5000"
,
"extendedTimeOut"
:
"1000"
,
"showEasing"
:
"swing"
,
"hideEasing"
:
"linear"
,
"showMethod"
:
"fadeIn"
,
"hideMethod"
:
"fadeOut"
};
$(
'#toastr-success'
).click(
function
() {
toastr.success(
'This is a success notification from toastr.'
)
});
$(
'#toastr-info'
).click(
function
() {
toastr.info(
'This is an information notification provided by toastr.'
)
});
$(
'#toastr-warning'
).click(
function
() {
toastr.warning(
'This is a warning notification provided by toastr.'
)
});
$(
'#toastr-error'
).click(
function
() {
toastr.error(
'This is an error notification provided by toastr.'
)
});
});
</script>
Reply
Answers (
3
)
Add new row in xml file using asp.net c#
performe the search on writting in textbox