Call any JS Function from code in ASP.NET C#
Hi.....today ill share how to call any js function from code in asp.
Sample js code:
<script type="text/javascript">
function success() {
PNotify.prototype.options.styling = "bootstrap3";
PNotify.prototype.options.styling = "jqueryui";
PNotify.prototype.options.styling = "fontawesome";
new PNotify({
title: 'INFORMATION',
type: 'info',
text: 'Item Retrieved Successfully.',
after_init: function (notice) {
notice.attention('bounce');
}
});
}
</script>
on your .cs code.
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "success();", true);
just copy the code and change the function name and paste it on onClick or page load events of your page.
done..!Thank you. Enjoy Coding....and smoking. :)
Sample js code:
<script type="text/javascript">
function success() {
PNotify.prototype.options.styling = "bootstrap3";
PNotify.prototype.options.styling = "jqueryui";
PNotify.prototype.options.styling = "fontawesome";
new PNotify({
title: 'INFORMATION',
type: 'info',
text: 'Item Retrieved Successfully.',
after_init: function (notice) {
notice.attention('bounce');
}
});
}
</script>
on your .cs code.
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "success();", true);
just copy the code and change the function name and paste it on onClick or page load events of your page.
done..!Thank you. Enjoy Coding....and smoking. :)
Comments
Post a Comment