"David C" <(E-Mail Removed)> wrote in
news:O$(E-Mail Removed):
> I created a new class in my App_Code folder and added a public
> function. When I go to a code page on one of the web pages and I type
> in the xxClass.Function I am not getting any intellisense that shows
> the function name to pick from. Then if I spell out the whole name,
> e.g. ValidateClass.GetPINno it tells me the function does not exist?
> What am I missing? The same process works fine in another web
> application. p.s. Using VS 2008 and .net 3.5
Does it look like this:
public class xxClass
{
public void Function()
{
}
}
Public Class xxClass
Public Function MyFunction() as Something
End Function
End Class
or this
public class xxClass
{
public static void MyFunction()
{
}
}
Public Class xxClass
Public Shared Function MyFunction() as Something
End Function
End Class
If the former, you cannot declare like xxClass.MyFunction, as the items
require an instance. You can do this, however:
xxClass cls = new xxClass();
cls.MyFunction();
Dim cls As New xxClass()
cls.MyFunction()
the other possibility is you are not getting to the class period, as it
is not recognizing the namespace.
As a rule, I DO NOT use App_Code for anything. In general, people stick
application code there, and ASP.NET is a user interface, not an
application. If I have UI specific code, I will still create a library
named something like CompanyName.ProjectName.UI.{LibraryTypeNameHere}.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************