183
rated 0 times
[
190]
[
7]
/ answers: 1 / hits: 85993
/ 15 Years ago, mon, december 7, 2009, 12:00:00
How to detect/track/check postback in javascript(e.g in asp.net Page.isPostBack())?
Any suggestion?
More From » asp.net
How to detect/track/check postback in javascript(e.g in asp.net Page.isPostBack())?
Any suggestion?
ASPX:
<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.