How to detect/track/check postback in javascript(e.g in asp.net Page.isPostBack())? Any suggestion?
See Question&Answers more detail:osHow to detect/track/check postback in javascript(e.g in asp.net Page.isPostBack())? Any suggestion?
See Question&Answers more detail:osASPX:
<input type="hidden" id="_ispostback" value="<%=Page.IsPostBack.ToString()%>" />
Client-side Script:
function isPostBack() { //function to check if page is a postback-ed one
return document.getElementById('_ispostback').value == 'True';
}
PS: I have not tested it but I've done somthing similar before and it works.