Bulvak
Bulvak

Reputation: 1804

how can I treat a button handler like a method call?

I have a VERY large asp.net application, it has many different .cs files in the project. I would like to trigger one button handler's method from another project. The reason is that in the .cs file that the button handler is it, there are many variables and methods being used that are private and I dont want to change the accessibility of all of them to public in order to access them.

SIMPLY put. how can I call the method " protected void try_validate(object sender, EventArgs e)" from another method in a different .cs file?

enter image description here

I am trying to access resetPage from a different .cs file in the project. I HAVE placed the code for resetPage into a new method called WriteToDB but even that I cant call from the other .cs file

enter image description here

Upvotes: 0

Views: 135

Answers (1)

test
test

Reputation: 2618

Is it possible if you place the logic within the handler into another public method and then you invoke it from where ever you need to?

Upvotes: 3

Related Questions