Is it possible to fire the onclientclick after the onclick event for asp.net button? I am sending some values in session from onclick event and then I want to fire onclientclick. Any help would be advisable.

有帮助吗?

解决方案

You can call the javascript function using register client script inside the onclick of the button.

    ClientScript.RegisterStartupScript(Page.GetType, "Javascript", 
"YourButton_OnClientClick_Handler();", true);

其他提示

Are you using an Update Panel? If yes, capture the endrequest and write code there..

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top