user1663661
user1663661

Reputation: 109

asp.net using different App_Code folder

  1. I created folder "Test" under my web site root.
  2. Under this folder I created another App_Code folder and put my class code there.
  3. I also add default.aspx under Test folder.

In my code behind I cannot access class code. Only classes under top App_Code is available.

How can I access code under second App_Code? I tried to add same namespace for page and class, but this does not help.

Upvotes: 1

Views: 1152

Answers (1)

beautifulcoder
beautifulcoder

Reputation: 11320

You must put all class code inside the App_Code folder from the root folder. One trick would be to create a Test folder inside the main App_Code folder. You are allowed to put as many subfolders as you need.

https://msdn.microsoft.com/en-us/library/t990ks23(v=vs.140).aspx

Upvotes: 2

Related Questions