I have JQuery function shows notification message. From my asp.net page I want to call it when page gets fully loaded e.g when: Request.QueryString[c_opID] != null; I tried to call the function from Page_Load and Page_LoadComplete using ScriptManager.RegisterStartupScript() but the function doesn't fire up. On other hand, when I call it on button click it does what should be done.
JQuery Function:
function showMessage(title, message) {
PNotify.prototype.options.styling = "jqueryui";
var notice = new PNotify({
title: title,
text: message,
type: 'success',
opacity: 1,
animate_speed: 'fast',
addclass: 'custom'
});
notice.get().click(function() {
notice.remove();
});
setTimeout(function() {
notice.remove();
}, 3000);
}
Asp.Net code behind call:
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", @"showMessage('" + title + "','" + message + "');", true);