Since you are using Html page to post details to Asp.Net Page, I assume you are using Ajax. JQuery Ajax provides attribute
"success"
, In which you can perform your action once Ajax request gets complete.
You can perform DataSave operation on
Page_Load
Event of your Asp.Net Page. Then write "true" / "false" using
Respons.Write
based on result. And then display message in the Javascript function assigned to attribute
"success"
.
You can refer below code for this.
<script language="javascript" type="text/javascript">
function JqueryAjaxExample() {
$.ajax({
type: "POST",
url: "JqueryExampleAjax.aspx",
success: function (serverDate) {
JqueryAjaxExampleResponse(serverDate);
}
});
}
function JqueryAjaxExampleResponse(result) {
if(result=='true')
{
alert('Details saves successfully.);
}
else
{
alert('Failed to save.);
}
}
</script>
You can also refer below Article.
Simplifying Asp.Net Core Ajax