views:

102

answers:

3

Im getting that error when try to call a __doPostBack on one of my pages, every page that i have in the project use __doPostBack function but in this particular page im getting that Javascript error.

i was looking in the internet and the only thing i read is that this error happends when i have a unclose tag but i review the site and its ok.

Error: __doPostBack is not defined Source File: htt://localhost:99/ProjectName/Disable.aspx Line: 1

A: 

__doPostBack() should be automatically included by any ASP.NET WebControl that could cause a post back. You sound like you are calling it manually in some Javascript you wrote. If so, you will need to include a WebControl, to make sure that function in inserted onto the page.

James Curran
yeah but in this case ive to call a manual postback, im doing this in others pages
jmpena
hey i add a asp button and nothing happends but if i use a LinkButton its works, thanks
jmpena
A: 

Try calling the RegisterRequiresPostBack method. It should make the ASP.NET runtime include the __doPostBack code.

korchev