it's not a good thing simulating that way a button click, it's better to put all your "click" code in some function which you call in button click handler, and then you can call this function also from other places in code.
anyway, you can do this
this.Button1_Click(this, new EventArgs()); - it's good as long as you don't need the EventArgs object
Main Topics
Browse All Topics





by: Idle_MindPosted on 2009-07-04 at 00:16:32ID: 24776151
Not sure about WebForms, but in WinForms you use:
Button1.PeformClick();