![]() |
how can I access methods in another class?
ok this is basic but it really puzzles me.
I have an .aspx page and within it a user control (for example mycontrol.aspx and it's code file mycontrol.aspx.cs). In the code for my base page I declare a public calculator class with some simple functions. Now how can I access and use this class' methods from the user control code, the compiler keeps saying "The type or namespace name 'Calculator' could not be found " PS I'm not using dll files just Src="" attributes in the directives |
Re: how can I access methods in another class?
You want a user control to be able to use a class on your page? I would
create the calculator class in a separate CS file in the web project, and then you can access it from either page. If you want the page to hold the instance of the class I would create a property in the user control that takes a type of Calculator and it has a set that sets a local variable. -- Eric Renken Demiurge Software LLC http://www.demiurge.us "Davids" <dbspam@simnet.is> wrote in message news:uypO2d5wEHA.1192@tk2msftngp13.phx.gbl... > ok this is basic but it really puzzles me. > I have an .aspx page and within it a user control (for example > mycontrol.aspx and it's code file mycontrol.aspx.cs). In the code for my > base page I declare a public calculator class with some simple functions. > Now how can I access and use this class' methods from the user control > code, the compiler keeps saying "The type or namespace name 'Calculator' > could not be found " > > PS I'm not using dll files just Src="" attributes in the directives > |
| All times are GMT. The time now is 07:16 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.