New Methods aren't being recognised in class definition in Visual Studio 2005

Hi all

I have a asp.net solution with several projects in it and I have created a new method in a static class in one project but hwhen I try to call it, I get the following error:

Error      1      'WorkImmControls.Utilities.MetaDataHelper' does not contain a definition for 'GetPagesByMetaID'      

I have double check the class name and the method definition is there and I have added the proper references to the namespace and class but it doesn't help.

I am stumped by this, hoping someone can help
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Immediacy;
using Immediacy.Web;
using Immediacy.Web.UI;
using WorkImm.Data.CoreImm;
using WorkImmControls;
using WorkImmControls.Utilities;
using WorkImmControls.Citi;
using WorkImmControls.Data;
 
public partial class ProfileFilter : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
      
 
        DataTable pagesDT =MetaDataHelper.GetPagesByMetaID(13);
        DataTable ProfileMetaData;
        DataTable PagePath;
        int HomepageID = 0;
        ArrayList filterAttributes = new ArrayList();
        ArrayList filterSelectedValues = new ArrayList();
        List<CitiProfile> filteredProfiles = new List<CitiProfile>();
 
        if (DropDownList1.SelectedValue != "none")
        {
            filterAttributes.Add("region");
            filterSelectedValues.Add(DropDownList1.SelectedValue);
        }
 
        if (DropDownList2.SelectedValue != "none")
        {
            filterAttributes.Add("country");
            filterSelectedValues.Add(DropDownList2.SelectedValue);
        }
 
        foreach (DataRow row in pagesDT.Rows)
        {
            CitiProfile citiProfile = new CitiProfile();
            LivePage immPage = PageManager.GetPage((int)row["pageid"], PageState.Live);
            ProfileMetaData = MetaDataHelper.GetMetaDataByTypeID(13, immPage.ID);
            int valuecounter = 0;
 
            if (ProfileMetaData.Rows.Count > 0)
            {
                citiProfile.Name = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_name");
                citiProfile.JobTitle = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_jobtitle");
                citiProfile.Education = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_education");
                citiProfile.Program = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_program");
                citiProfile.ImageURL = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_image");
                citiProfile.DegreeType = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_level");
                citiProfile.Region = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_region");
                citiProfile.Location = MetaDataHelper.GetMetaData(13, immPage.ID, "profile_country");
                citiProfile.Link = UrlManager.GetUrlForPage(immPage.ID);
                citiProfile.BusinessID = immPage.ParentID;
                PagePath = MetaDataHelper.GetPagePath(HomepageID, immPage.ID);
                citiProfile.BusinessGroupID = GetBGValue(PagePath, immPage.ID, HomepageID);
            }
 
            for (int i = 0; i < filterSelectedValues.Count; i++)
            {
                if (MetaDataHelper.GetMetaData(13, immPage.ID, "profile_"+filterAttributes[i].ToString())==filterSelectedValues[i].ToString())
                    valuecounter++;
 
            }
 
            if (valuecounter == filterSelectedValues.Count)
                filteredProfiles.Add(citiProfile);
 
        }
        
        if (filteredProfiles.Count > 0)
        {
            Repeater1.DataSource = filteredProfiles;
            Repeater1.DataBind();
        }
 
 
 
    }
 
    protected int GetBGValue(DataTable PagePath, int pageId, int homepageID)
    {
        int bGroupID = 0;
        if (PagePath.Rows.Count == 4)
        {
            bGroupID = (int)PagePath.Rows[2]["p_page_id"];
 
            return bGroupID;
        }
        else
        {
            return bGroupID;
        }
 
    }
}
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web;
using System.Web.UI.WebControls;
using Immediacy;
using Immediacy.Web;
using Immediacy.Web.UI;
using WorkImmControls.Data;
 
namespace WorkImmControls.Utilities
{
    public class MetaDataHelper
    {
        private static SqlConnection _connection;
        private static SqlDataReader _dataReader;
        private static string _metavalue = String.Empty;
        private static int _metaid = 0;
     
 
        public static SqlConnection Connection
        {
            get 
            {   if (_connection == null)
                    _connection = new SqlConnection(Immediacy.Configuration.Settings.ConnectionString);
 
                return _connection; 
            }
            set { _connection = value; }
        }
 
 
        
 
 
        public static SqlDataReader MetaDataReader
        {
            get
            {
                //if (_dataReader == null)
                //    _dataReader = new SqlDataReader(;
 
                return _dataReader; 
            }
            set { _dataReader = value; }
        }
 
        
 
  
 
        public static string GetMetaData(int _metaID,string _metaField)
        {
            //int _metaID = 16;
            //string _metaField = "image_desc";
            //MetaValuesDictionary = new Dictionary<string, string>();
            //Connection = new SqlConnection(Immediacy.Configuration.Settings.ConnectionString);
            //Connection.Open();
            //using (SqlCommand cmd = new SqlCommand())
            //{
            //    cmd.CommandType = CommandType.StoredProcedure;
            //    cmd.Connection = Connection;
            //    cmd.CommandText = "immsp_cms_metadata_extended_GetByPage";
            //    cmd.Parameters.AddWithValue("PageId", (int)Immediacy.Web.ImmHttpContext.Current.ContentPage.ID);
            //    cmd.Parameters.AddWithValue("MetaId", (int)_metaID);
           
            try
            {
                    DataTable dt = new DataTable();
                    //_dataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                    //dt.Load(_dataReader, LoadOption.OverwriteChanges);
                    DBHelper db = new DBHelper();
               
                    dt = db.GetMetaDataByPage(_metaID, Immediacy.Web.ImmHttpContext.Current.ContentPage.ID).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                      
                        foreach (DataRow row in dt.Rows)
                        {
                    
                            if ((string)row["FieldName"] == _metaField)
                            {
                                _metavalue = row["FieldValue"] as String;
                                break;
                            }
 
                        }
                    }
 
 
                    //dt.Dispose();
 
 
                }
                catch
                {
                    //_dataReader.Close();
                }
            //}
 
            return _metavalue;
        }
 
        public static string GetMetaData(int _metaID,int _pageID, string _metaField)
        {
 
 
            try
            {
                DataTable dt = new DataTable();
                DBHelper db = new DBHelper();
 
                dt = db.GetMetaDataByPage(_metaID, _pageID).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow row in dt.Rows)
                    {
 
                        if ((string)row["FieldName"] == _metaField)
                        {
                            _metavalue = row["FieldValue"] as String;
                            break;
                        }
 
                    }
                }
 
 
                //dt.Dispose();
 
 
            }
            catch
            {
                //_dataReader.Close();
            }
            //}
 
            return _metavalue;
        }
        public static DataTable GetPagesByMetaVal(int _metaID, string _metaValue)
        {
            DBHelper db = new DBHelper();
            return db.GetPagesByMetaVal(_metaID,  _metaValue);
 
        }
 
        public static DataTable GetPagesByMetaID(int _metaID)
        {
            DBHelper db = new DBHelper();
            return db.GetPagesByMetaID(_metaID);
 
        }
 
        public static DataTable GetPagesByMetaVal( string _metaValue)
        {
            DBHelper db = new DBHelper();
            return db.GetPagesByMetaVal( _metaValue);
 
        }
 
        public static Dictionary<String, String> GetMultilingualMetaValuesByPage(int _pageID)
        {
            Dictionary<String, String> languageMDDic = new Dictionary<string, string>();
            DBHelper db =new DBHelper();
 
            
            foreach (DataRow row in db.GetMultiLingualPageMetaValues(_pageID).Rows)
            {
                languageMDDic.Add(row["FieldName"] as string, row["FieldValue"] as string);
            }
 
            return languageMDDic;
        }
 
        public static DataTable GetMetaDataByTypeID(int _metaID, int _pageID)
        {
            DBHelper db = new DBHelper();
 
            return db.GetMetaDataByPage(_metaID, _pageID).Tables[0];
        }
 
        public static DataTable GetMetaDataByPage( int _pageID)
        {
            DBHelper db = new DBHelper();
 
            return db.GetMetaDataByPage( _pageID).Tables[0];
        }
 
        public static DataTable GetChildPagesByLevel(int _parentpageID, int level)
        {
            DBHelper db = new DBHelper();
 
            return db.GetChildPagesByLevel(_parentpageID, level);
        }
 
 
        public static DataTable GetPagePath(int _HomePageID, int _targetPageID)
        {
            DBHelper db = new DBHelper();
 
            return db.GetPath(_HomePageID, _targetPageID);
        }
       
        public static DataTable GetChildPagesByPageID(int _HomePageID, int _maxlevel)
        {
            DBHelper db = new DBHelper();
 
            return db.GetTreeMenu(_HomePageID, _maxlevel);
        }
 
        public static int GetMetaTypeIDByMetaName(string MetaName)
        {
            //DBHelper db = new DBHelper();
 
            //return db.GetMetaIdByName(MetaName);
 
            try
            {
                DataTable dt = new DataTable();
                DBHelper db = new DBHelper();
                //int _metaid = 0;
                dt = db.GetMetaIdByName(MetaName);
 
                if (dt.Rows.Count == 1)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        _metaid = (int) row[0];
                        break;
                    }
                }
                                
            }
            catch
            {
                
            }
 
            return _metaid;
        }
 
    }
}

Open in new window

indy28Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
Try rebuilding the static class first, then build your entire solution.  Also you may need to update references.  If worse comes to worse, remove all references from your solution, then re-add the project.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.