Reputation: 69
I have a question for you please.
Ths situation is like this:
I have a method specified in this namespace: namespace IkubInfo.NE.Web.UI
the method is like this : protected void Export2(GridView gv, object data, string title)
I need to call this method in another page which doesn't have the same namespace.
How can I call this method inside this method : protected void btnExport_Click(object sender, EventArgs e)
?
Your help would be appreciated.
Upvotes: 0
Views: 69
Reputation: 69
I found the solution for my question, also thanks to all of your advices.
Firstly I used this line: using IkubInfo.NE.Web.UI;
Than, all I had to do is to call the method like this: this.Export2(value1, value2, value3);
inside the button click events which calls the method. I hope this solution would help anybody else in this forum. Thank you for all the support!
Upvotes: 0
Reputation: 29836
I assume we are talking about business logic that doesn't have any UI touches.
The best practice is to move this logic into managers\services that sit in different dll's and call them via the events.
Upvotes: 2