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

  • Thread starter Thread starter Matt Jensen
  • Start date Start date
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
 
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

Back
Top