Help! How do access a method which is defined outside the page?

Discussion in 'ASP.NET / ASP.NET Core' started by jkarafin, Jul 27, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm pretty new at C#/Visual Studio, and a simple question has me stumped. (Arg.) I want to re-use a validation routine from several pages. I've tried writing the routine as a method within a component object, within a user control, and simply within a cs file not associated with an aspx or ascx file. No matter what I try, I can't seem to get to the method from the calling aspx page's code. And when I try an extern statement, I get

    'CMI.Component1' in explicit interface declaration is not an interface

    which I don't understand at all.

    Can someone give me just one simple example of how one re-uses a method?

    Thanks.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page