Ok managed to get the code working, as in no errors but it wont do a post back after ive confirmed when I click on the div?:
The problem is because __doPostBack
is not defined. It's not defined because you didn't put any control on your page that is a an IPostBackEventHandler
, like LinkButton
is.
In order to Page.IsPostBack
to be true, you have to either:
IPostBackEventHandler
and, of course, put it on your pageIPostBackEventHandler
on your page. One that doesn't do anything. Like a LinkButton
.Either way ASP.NET will define the __doPostBack
function at client side and your code will finally postback