UserControls have a property called "Page" that is a reference to the page that contains the usercontrol. You could use that property to access the methods contained in the page object. One thing to keep in mind, you need to cast the page to the actual page class you are using like the following:
((MyPage)this.Parent.Page).fnDeleteRecord();
>Hi,
>
>For a new ASP.Net app we're building a number of web forms have the same basic functionality - that is - the ability to Add-Edit-Delete records. That being the case, I'd like to build a user control with the required command buttons that I'd just have to drop onto each web form.
>
>From the user control, I'd like to have it call a 'generic' function on each page. For example, when the Delete commandbutton is clicked, it should call the function 'fnDeleteRecord' on whichever web form is being used. So, my question is how do I tell the user control to call fnDeleteRecord on the web form?
>
>Or, am I way out in left field and is there a better way to do this ...
>
>Thanks, Al
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi