hi,

how to call a button click event programmatically in web application C#.


Thanks,
Sindhuja.K

Just like you'd call any other method.

Put Your Click Event Code in to one method You can call that method while button click event occurs as well as when you need that functionality that time also you can call function and perform it

Example

   protected void Button_click(Args)//event method
   {
    common_functionality(args);
    }
   protected return_type common_functionality(args)
    {
       //your code
     }
    protected return_type user_function(args)//user method or may event method
    {
       //your code
       common_functionality(args);
       //your code
     }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.