|
Subject:
|
Help with Delegates
|
|
Posted By:
|
mike_remember
|
Post Date:
|
9/10/2005 6:55:24 AM
|
Hi Friends
Need urgent help!! Let me explain. Say I have 2 classes in C#. Class1 & Class2. Class1 has a function e.g. BindGrid(string procedurename)
Now what I want to do is pass the procedure name to the function BindGrid from Class2 and make that function bind a datagrid.
Please help me to make this achieve using Delegates and Event Handler. Thanks its urgent
Regards Mike
|
|
Reply By:
|
planoie
|
Reply Date:
|
9/10/2005 4:59:44 PM
|
What is "procedurename"? Is this a database procedure or the name of a method in your code? Can you explain more specifically what the BindGrid method is going to do?
-Peter
|
|
Reply By:
|
mike_remember
|
Reply Date:
|
9/12/2005 1:50:08 AM
|
Thanks Peter for the reply.
Let me explain, BindGrid() is a method name that will take the parameter procedurename which is the name of Database Procedure that I will pass from the second page class2 to the first page class1. Bindgrid will then bind a datagrid.
Hey Peter, let me tell you this is just an example. What I want to know is how can I call a function on a second page from a first specifically using Event Handler and Delegates. (ONCE AGAIN USING BOTH).
Thanks
|
|
Reply By:
|
mike_remember
|
Reply Date:
|
9/19/2005 3:15:16 AM
|
Hey Friends
Any reply to this.........
|
|
Reply By:
|
planoie
|
Reply Date:
|
10/4/2005 7:32:17 AM
|
Mike,
You seem to be discussing two different idea. 1) Passing a database procedure name which is nothing more than a string 2) Passing a delegate to a function
These are unrelated concepts so I'm still not clear on what you are trying to acheive. For one thing, you are going to have problems trying to deal with two pages at a time when dealing with delegates. (Passing a string from page to page is no problem because that can be done any number of ways.)
Sorry I can't give you more than that. (Also for taking so long, I've been swamped with work.)
-Peter
|