Click here to Skip to main content
15,892,269 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
There is an error that ReturnAnimalDetails method is not in current context, but I have changed the method name to returndetails and saved it.

This error message is still showing

Line 81:     public DropDownList FillDropDownList(DropDownList DropDownListName)
Line 82:     {
Line 83:         DataTable dt = ReturnAnimalDetails().Tables[0];
Line 84: 
Line 85:         DropDownList ddl = dbObject.FillAndReturnDropDownList(DropDownListName,dt);
Posted
Updated 17-Jul-11 2:42am
v3
Comments
Dalek Dave 17-Jul-11 8:43am    
Edited to put the question in the question section, not in the title.

It doesn't matter what the name is, if it is in a different Class or Namespace, then it is not available to you code, unless you specifiy where it is, and have permissions to it.

It may be as simple as using "MyClass.ReturnAnimalDetails", or you may need to refer to a specific instance. Where did you declare ReturnAnimalDetails and was it public or private?
 
Share this answer
 
Comments
Espen Harlinn 17-Jul-11 8:52am    
Good points :)
Mohammad A Rahman 17-Jul-11 21:53pm    
Good point.
The code that you decided to show us does not declare ReturnAnimalDetails(), it has no closing parenthesis and the initial public declaration has problems.
There is no indication where the other items are and it will be impossible to help without more information/code.

I know you would like help, but you need to help us help you by providing far more than you have.
 
Share this answer
 
Comments
Espen Harlinn 17-Jul-11 8:52am    
Good points, Dalek :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900