Abbas
Abbas

Reputation: 5044

Unable to access class in App_Code from code behind in ASP.Net Website Project

I have been using ASP.Net's website project from last 5years, but haven't caught in problem as such, i have created new website project using DotNetNuke, added classes in App_Code folder, now when i try to access the class from code behind, i don't get any intellisense for the class/methods, i even tried wrapping class inside a namespace, that too didn't helped, can anyone point me to right direction, here's my code: Class in App_code.

public class Markaz
{
    /// <summary>
    /// Get list of all markaz in cache form
    /// </summary>
    /// <returns>List<Entities.Markaz></returns>
    public List<Entities.Markaz> GetAllMarkaz()
    {
        List<Entities.Markaz> list = DataCache.GetCache<List<Entities.Markaz>>("MarkazList");
        if (list == null)
        {
            list = CBO.FillCollection<Entities.Markaz>(Data.Markaz.GetAllMarkaz());
            DataCache.SetCache("MarkazList", list);
        }
        return list;
    }
}

Upvotes: 0

Views: 446

Answers (1)

Sam FarajpourGhamari
Sam FarajpourGhamari

Reputation: 14741

It seems your .cs files are not compile at all. Select your .cs file from the solution explorer window and on the properties window set Built Action to Compile and Copy to Output Directory to Do not copy

Upvotes: 0

Related Questions