Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User control question
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00696293
Message ID:
00696305
Views:
15
You can use Parent property to reference back to the page on which the control is dropped. You will need to cast the Page object to whatever your base page type.

For example, I am calling Modify method on the Page when user clicks on Modify page.
 ((aDataEntryForm) this.Parent.Page).Modify();
>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
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform