Why Controller doesn't recognize a public method which (yet) appears in the intellisense ?
Posted
by Richard77
on Stack Overflow
See other posts from Stack Overflow
or by Richard77
Published on 2010-05-26T13:16:28Z
Indexed on
2010/05/26
13:21 UTC
Read the original article
Hit count: 151
asp.net-mvc
|visual-studio-2008
Hello,
I'm using an helper class that I called CreateEditOrganizationService where I put all the helper methods. In my controller, I've createService as object of that class. So far, I've got 5 methods. Now, I've just defined a 6th method called Set_TypeOrganization.
I'm getting the Set_TypeOrganization in the intellisense, but after I've chose it, I get the following error: *CreateEditOrganizationService does not contain a definition for Set_TypeOrganization are you missing a directive or a reference?*
public List<TypeOrganization> Set_TypeOrganization(string choice)
{
//Definition goes here...
}
and in my Controller
CreateEditOrganizationService createService = new CreateEditOrganizationService();
//...
ViewData["TypeOrganizations"] = createService.Set_TypeOrganization(choice);
Unfortunately, VS shows me the error? Yet, the method appear in the intellisense when I type a dot after the createService object.
Thannks for helping
© Stack Overflow or respective owner