Ok, so I have my default.aspx page and with it all the contents that it needs for the default.aspx.cs page. What i want to do is seperate parts of the .CS file into a class I would call ServerConnect which will handle all my database setup calls. So I put ServerConnect.c s into the app_code directory. When I run this on my machine locally, it picks up the class file no problem but when I put the machine on a live server I get an error
Compiler Error Message: CS0246: The type or namespace name 'ServerConnect' could not be found (are you missing a using directive or an assembly reference?)
I'm a little bit lost, I've read in numerous places that just adding the .cs file to the app_code directory is all you need to do. I must be missing something, can anyone help me understand how to bring in additional class files into a program?
Or am I just going about this all wrong. My intent is to create several class files that can be called by various programs without duplicating the code all the time. I just think my misunderstandin g is that I'm new to ASP, but not new to the C languages.
Compiler Error Message: CS0246: The type or namespace name 'ServerConnect' could not be found (are you missing a using directive or an assembly reference?)
I'm a little bit lost, I've read in numerous places that just adding the .cs file to the app_code directory is all you need to do. I must be missing something, can anyone help me understand how to bring in additional class files into a program?
Or am I just going about this all wrong. My intent is to create several class files that can be called by various programs without duplicating the code all the time. I just think my misunderstandin g is that I'm new to ASP, but not new to the C languages.
Comment