Firing an asp:button, from the c# code, not from the form

  • Thread starter Thread starter foldface
  • Start date Start date
F

foldface

Hi
As the subject says. I have a webpage with a button (amongest other
things). I want press the button from the code and hence initiate a postback

Thanks
F
 
Hello mate

why do you want to do this? What are you trying to achieve? There might be a better solution

Jon
 
Hi, F,

How about calling directly the handler:

Button1_Click(Buton1, EventArgs.Empty);

Greetings
Martin
 
just directly call the function that handles the button click event. Dont
worry about the parameters that you pass in for sender and eventargs.

OR

have the function that handles the click event call another function, then,
from code, call this new function.
 
Back
Top