문제

while trying to call a server side button event from javascript function my code looks like this

 _doPostBack('CalendarButton','CalendarButton_Click');

where CalendarButton is my buttonname and 'CalendarButton_Click' is my CalendarButtonevent

But this statement is not working. I know there is some minor error but i can't find what it is.

도움이 되었습니까?

해결책

You have one _ it has two

__doPostBack

다른 팁

You do not have to pass in the second argument to __doPostBack(). Just __doPostBack('CalendarButton', '').

Alternatively you can call click() on the button itself. document.getElementById("CalendarButton").click();.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top