noty javascriptプラグインを使用して通知を作成するjavascript関数がありますが、
<script type="text/javascript">
function generateAnoty(message) {
var noty_id = noty({
layout: 'center',
text: message,
modal: true,
type: 'success',
});
}
</script>
C# のビュー エンジンとして razor v2 を使用しており、mvc ではなく Web フォーム フレームが機能します。フォームを送信した後、上記の JavaScript 関数を呼び出したいと思います。これが私がやろうとしていることの例です。
//place for c#
if (IsPost)
{
//after submitting the form
//I wanna somehow call the js to show noty message
generateAnoty("You have successfully submitted the form!")
}
ps htmlボタンのonclickイベントハンドラーを使用してgenerateAnoty(message) jsメソッドを呼び出そうとすると、うまく機能します。