Thursday, August 28, 2008

Raising a Button Click Event Programmatically

How do you programmatically raise a button-click event?

The Solution

You can use the following C# code raise the event:

((IPostBackEventHandler)Button1).RaisePostBackEvent(null);

No comments: