C# Function - how to use in both aspx page and ascx user control

M

Matt Jensen

Howdy
I've got a function that I want to be able to be used by both my .aspx page
and by my user control which is stored in a ascx file.
how do I do this?

Public function in a .cs file included in the .aspx page?
Will try it out now
Thanks
Matt
 
S

SevDer

The basic thing you can do is:

from user control ascx page.

Do that:

((YourAspxPagesClassName)this.Page).MethodYouAreTryingToReach();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top