Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2005, 06:55 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default Help with Delegates

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
__________________
Regards
Mike
 
Old September 10th, 2005, 04:59 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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
 
Old September 12th, 2005, 01:50 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

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



 
Old September 19th, 2005, 03:15 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey Friends

Any reply to this.........

 
Old October 4th, 2005, 07:32 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with delegates mike_remember ASP.NET 1.0 and 1.1 Professional 2 November 7th, 2006 12:33 AM
Delegates RalphJr C# 2005 1 April 29th, 2006 08:06 AM
Delegates pramos.21d C# 1 April 11th, 2006 03:43 AM
I still Don't get Delegates p_nut33 Pro VB.NET 2002/2003 2 April 26th, 2004 01:50 PM
Delegates Ibn_Aziz C# 0 February 3rd, 2004 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.