문제

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