Using ASP.NET 4.0 (c#), I want to call a button’s OnClientClick event from code-behind (server-side). How do I code that in the code-behind file so that when the page is rendered again, the OnClientClick event is fired like the user clicked the button?
Using ASP.NET 4.0 (c#), I want to call a button’s OnClientClick event from code-behind
Share
Here are two ways to “call” the javascript alert function from code behind. You may be able to replace the alert function with your function: