I've created a search method in Category Class to access it outside class in web user control
public DataTable Search(string Field, string Value) { string query = String.Format("SELECT * FROM Category WHERE {0} LIKE %'{1}'%", Field, Value); return Search(query); }
then i defined a new object
Category Cat = new Category();
Cat.Search(RadioButtonList_search.SelectedValue,TextBox_Search.Text); //Error is here
when i tried to access Search method in Web user control Visual Studio seems that he can't fine any methods created inside Category Class.When i tried to ignore this problem and write Search method by hand Visual Studio gives me error "'My Project' doesn't contain any definition for Search (are u missing a using directive or an assembly reference?)". I can't see any programming error in my code and i also faced the same problem in another Website Project i tried to install VS Web-express on Virtual Machine and copied project Files i Faced the same problem too
I'm stacked there and need a solution any recommendations will be appreciated