Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

app_code

Status
Not open for further replies.

HrvojeVd

Programmer
Jun 22, 2008
36
HR
How to use class library from folder app_code on web site?
IT all works fine localy, but when i put it on web I get an erro: The type or namespace name 'Aplication' could not be found (are you missing a using directive or an assembly reference?)
'Aplication' is the class name.
 
I'm far from an expert, but it sounds like you're missing a reference to the class. In your solution explorer, expand the 'References' node and see if the class is there. If it isn't, right click on 'References', click 'Add Reference', then browse to where the .dll is and select it.

You might still need to add the using <name of reference>; in your code.

I hope that helps a bit.
 
sounds like a problem with deployment. how are you deploying the web site/app. Also, is this a web site, or a web application?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi,

just add a new class into that app_code folder (vb or c#), and put the following code in the folder.

Code:
Public Class MyClass

   Public Shared Function IsThereSomeone() As String
	IsThereSomeone = "Yep i am here!"
   End Function

End Class

After that you can access that classe from every aspx page of your project.

You access the function by typing that for example:

Code:
Response.Write (MyClass.IsThereSomeone())

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top