I'm experiencing this trouble that I can't figure out a solution.
I have a asp.net website project. A class library in app_code folder named Libs.cs (class name is Libs too).
The problem is :
if I want to reference the class in
*.aspx.csfiles, I have to set its Build Action property to : compile. This way I can reference the class without using theusingSynxtax ( for example my namespace is IK, I don't have to include :using IK;) , but I can't reference the class in the.aspx fileif I want to reference the class in
*.aspxfiles, I have to set its Build Action property to :content. This way I can reference the class using theimportSyntax ( for example my namespace is IK, I have to include :<%@ Import Namespace="IK" %>), but I can't reference the class in the.aspx.csfile
So now if I want to reference the class, I have to choose , aspx or aspx.cs. I tried to google and everything, but without success.