سؤال

i created a web site in VS2008, in App_Code folder i added a class

namespace irfulabs
{
    [DataObject(true)]
    public static class fooDALC
    {
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static IList<Screen> Getfoo()
        {

            //Do something
        }


        [DataObjectMethod(DataObjectMethodType.Insert, true)]
        public static void Insert(Screen src)
        {
            //Do something
        }
        [DataObjectMethod(DataObjectMethodType.Update, true)]
        public static void Update(Screen src)
        {
            //Do something
        }

        [DataObjectMethod(DataObjectMethodType.Delete, true)]
        public static void Delete(Screen src)
        {
            //Do something
        }
    }
}

on page load event i call the method

using irfulabs;

GridView1.DataSource = fooDALC.Getfoo();
GridView1.DataBind();

and i received the error message "CS0103: The name 'fooDALC' does not exist in the current context"

هل كانت مفيدة؟

المحلول

As there was no issue with code, after setting application folder and virtual directory on my web hosting, page opened without error.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top