Error CS0103: The name 'Class1' does not exist in the current context

Posted by Mad coder. on Stack Overflow See other posts from Stack Overflow or by Mad coder.
Published on 2012-03-18T18:00:32Z Indexed on 2012/03/18 18:02 UTC
Read the original article Hit count: 219

Filed under:
|

In my website I created a class e.g. Class1.cs in App_Code folder when I am trying to load default page which is using this Class file I am getting the following error

CS0103: The name 'Class1' does not exist in the current context for the code

String something = Class1.item1(text1.Text, text2.Text);

and Class1.cs consists of

protected static string item1(string a, string b)
{
//some action here
return null;
}

Everything works fine in my VS2010 but when I host the website in my server I am getting this issue.

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-2.0