Reference class for ObjectDataSource

How to make Class for DataObjectAttribute visible in ObjectDataSourse

Page 1 of 1

5 Replies - 1639 Views - Last Post: 25 March 2010 - 07:34 AM Rate Topic: -----

#1 Net Cemeteries  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 14-April 09

Reference class for ObjectDataSource

Posted 21 March 2010 - 10:30 PM

here is a class code :

    > [DataObjectAttribute] public class
    > Report {    public this() {}
    > 
    >  
    > [DataObjectMethodAttribute(DataObjectMethodType.Select,
    > true)]   public static
    > GetAllEmployees() : DataTable   {
    >       null   }
    > 
    >  
    > [DataObjectMethodAttribute(DataObjectMethodType.Delete,
    > true)]   public
    > DeleteEmployeeByID(employeeID : int) :
    > void   {
    >        throw Exception("The value passed to the delete method is " +
    > employeeID.ToString());   } }


but I still can't find where and how and what I must to config to access it ?

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod=" ?????????? ">
</asp:ObjectDataSource>

Web Application doesn't support App_Code but I can use compiled Bin somehow, the question is how ?

So I think I need to reference it somehow. I've tried compile it as new project (but it is'n good and isn't able for me , I need a lot of other classes for it) but I even can't see no cases in designer on ObjectDataSource

I've tried a lot of methods and but nothing helps :(

:helpsmilie:

Is This A Good Question/Topic? 0
  • +

Replies To: Reference class for ObjectDataSource

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Reference class for ObjectDataSource

Posted 22 March 2010 - 07:28 AM

Web Applications do use the App_Code folder, as you can see in the screen shot.
Attached Image

When you create your first class it will prompt you to create the folder.
Was This Post Helpful? 0
  • +
  • -

#3 Net Cemeteries  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 14-April 09

Re: Reference class for ObjectDataSource

Posted 22 March 2010 - 10:41 PM

View PostJayman, on 22 March 2010 - 06:28 AM, said:

Web Applications do use the App_Code folder, as you can see in the screen shot.


It crashes with error when I put some class into App_Code folder
Was This Post Helpful? 0
  • +
  • -

#4 Net Cemeteries  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 14-April 09

Re: Reference class for ObjectDataSource

Posted 22 March 2010 - 11:32 PM

yes... it's looking like Nemerle problem.
Was This Post Helpful? 0
  • +
  • -

#5 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Reference class for ObjectDataSource

Posted 23 March 2010 - 07:32 AM

Don't use Nemerle. Not sure why you need it anyway.

From what little I read on it, it seems that it is just a lazy mans way of not having to explicitly declare types. I don't see how there is any benefit to that.
Was This Post Helpful? 0
  • +
  • -

#6 Net Cemeteries  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 14-April 09

Re: Reference class for ObjectDataSource

Posted 25 March 2010 - 07:34 AM

View PostJayman, on 23 March 2010 - 06:32 AM, said:

Don't use Nemerle. Not sure why you need it anyway.

From what little I read on it, it seems that it is just a lazy mans way of not having to explicitly declare types. I don't see how there is any benefit to that.


Nemerle got some more goals. And I like it. Like a macro or pattern matching.

here is some example.
After all. App_Code will be able to use soon ^___^

private static GetOSName() : string
{
match (Environment.OSVersion.Platform)
{
| PlatformID.Win32Windows => match (Environment.OSVersion.Version.Minor)
{
| 0 => "Windows 95"
| 10 =>
{
if (Environment.OSVersion.Version.Revision.ToString() == "2222A")
"Windows 98 Second Edition"
else
"Windows 98"
}
| 90 => "Windows Me"
}
| PlatformID.Win32NT => match (Environment.OSVersion.Version.Major)
{
| 3 => "Windows NT 3.51"
| 4 => "Windows NT 4.0"
| 5 =>match (Environment.OSVersion.Version.Minor)
{
| 0 => "Windows 2000"
| 1 => "Windows XP"
| 2 => "Windows Server 2003"
}
| 6 => "Windows Vista"
| 7 => "Windows Se7en" // no idea
}

}
}

This post has been edited by Net Cemeteries: 25 March 2010 - 07:35 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1