halid peynirci halid peynirci - 1 month ago 30
ASP.NET (C#) Question

Class not available

İ create a project "Deneme". create a folder as "App_Code" and create a class Islem in this folder. Then i create new aspx page but i couldn't see this class.error message is "Deneme is available Deneme is not availabe" I couldn't understand. My friend cab see this class on his computer but I can't. I created a new webform

default.aspx
. I couldn't reach this class, but I can reach
webform1.aspx
in this folder. Can you help me enter image description here

enter image description here

Answer

provide namespace in your Islem.cs like this

namespace Deneme
{
 public class Islem
 {
    // .... logic
 }
}

create new class in App_Code folder, there is no namespace by default. so you can no access it.

Comments