Is it possible to determine if an ASP.NET page is a postback from javascript? So basically a javascript equivalent of C# Page.IsPostBack.
Thanks.
I would just put a render tag in the javascript
var isPostBack = <%= Page.IsPostBack ? "true" : "false" %>;
Putting the "true" and "false" as strings should be done to eliminate any possible issues converting the type to a string as in C# true.ToString() is usually "True" which is an error in javascript.
Sure. Just use your server code to write out a javascript flag, if you really need this.
But I suspect you're barking up the wrong tree here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With