473,471 Members | 4,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Namespace Classes used by DataBinder

When I add a template column to a DataGrid and bind some data from an object
in a collection using the following:

<% DataBinder.Eval(Container, "DataItem.Department.DepartmentName") %>

What Namespace/Class is Eval located in and can I call if from code behind.
I have implemented my own version of reflection nased property navigation
but I'd really rather use the original wheel than reinvent it.

TIA

MattC
Nov 19 '05 #1
6 2040
Eval is a static/shared member of the class DataBinder which is located in
System.Web.UI

There's no reason why you can't use it in codebehind.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"MattC" <m@m.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
When I add a template column to a DataGrid and bind some data from an object in a collection using the following:

<% DataBinder.Eval(Container, "DataItem.Department.DepartmentName") %>

What Namespace/Class is Eval located in and can I call if from code behind. I have implemented my own version of reflection nased property navigation
but I'd really rather use the original wheel than reinvent it.

TIA

MattC

Nov 19 '05 #2
I'm just thinking, it's a really usefull little method, expecially to use in
BLL, but I dont realyl want to have to add the System.Web.UI to my BLL. I
would like if the code that parses the property to get its value (from
Something.SomethingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl...
Eval is a static/shared member of the class DataBinder which is located in
System.Web.UI

There's no reason why you can't use it in codebehind.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"MattC" <m@m.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
When I add a template column to a DataGrid and bind some data from an

object
in a collection using the following:

<% DataBinder.Eval(Container, "DataItem.Department.DepartmentName") %>

What Namespace/Class is Eval located in and can I call if from code

behind.
I have implemented my own version of reflection nased property navigation
but I'd really rather use the original wheel than reinvent it.

TIA

MattC


Nov 19 '05 #3
i believe you can via the PropertyInfo member and GetValue you can do a
google search for those and come up with some hits. Reflection might be a
powerful tool, but I'd take a long hard look to make sure it was really
necessary...I find it tends to make code less than readable.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"MattC" <m@m.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I'm just thinking, it's a really usefull little method, expecially to use in BLL, but I dont realyl want to have to add the System.Web.UI to my BLL. I
would like if the code that parses the property to get its value (from
Something.SomethingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl...
Eval is a static/shared member of the class DataBinder which is located in System.Web.UI

There's no reason why you can't use it in codebehind.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"MattC" <m@m.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
When I add a template column to a DataGrid and bind some data from an

object
in a collection using the following:

<% DataBinder.Eval(Container, "DataItem.Department.DepartmentName") %>

What Namespace/Class is Eval located in and can I call if from code

behind.
I have implemented my own version of reflection nased property navigation but I'd really rather use the original wheel than reinvent it.

TIA

MattC



Nov 19 '05 #4
True, but when was the last time Application Infrastructure codewas
generally readable LOL :p

Like I said, I do have some code that will parse a property and get its
value (or null) but figured that DataBinder.Eval (which does exacly the same
thing) must but making a call internally to a method that already does this.

MattC

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
i believe you can via the PropertyInfo member and GetValue you can do a
google search for those and come up with some hits. Reflection might be a
powerful tool, but I'd take a long hard look to make sure it was really
necessary...I find it tends to make code less than readable.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"MattC" <m@m.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I'm just thinking, it's a really usefull little method, expecially to use

in
BLL, but I dont realyl want to have to add the System.Web.UI to my BLL.
I
would like if the code that parses the property to get its value (from
Something.SomethingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl...
> Eval is a static/shared member of the class DataBinder which is located in > System.Web.UI
>
> There's no reason why you can't use it in codebehind.
>
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/ - New and Improved (yes, the popup is
> annoying)
> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
> "MattC" <m@m.com> wrote in message
> news:%2****************@TK2MSFTNGP10.phx.gbl...
>> When I add a template column to a DataGrid and bind some data from an
> object
>> in a collection using the following:
>>
>> <% DataBinder.Eval(Container, "DataItem.Department.DepartmentName")
>> %>
>>
>> What Namespace/Class is Eval located in and can I call if from code
> behind.
>> I have implemented my own version of reflection nased property navigation >> but I'd really rather use the original wheel than reinvent it.
>>
>> TIA
>>
>> MattC
>>
>>
>
>



Nov 19 '05 #5
I have an article "Metadata and Reflection in .NET" [1] explaining
some basics. Reflection is powerful but can hurt performance if it's
used in the wrong places.

[1] http://odetocode.com/Articles/288.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Mon, 7 Mar 2005 15:54:20 -0000, "MattC" <m@m.com> wrote:
True, but when was the last time Application Infrastructure codewas
generally readable LOL :p

Like I said, I do have some code that will parse a property and get its
value (or null) but figured that DataBinder.Eval (which does exacly the same
thing) must but making a call internally to a method that already does this.

MattC


Nov 19 '05 #6
Thanks, I'll have aread now. Agreed, its often a case of 'suck it and see'.

MattC

"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:nb********************************@4ax.com...
I have an article "Metadata and Reflection in .NET" [1] explaining
some basics. Reflection is powerful but can hurt performance if it's
used in the wrong places.

[1] http://odetocode.com/Articles/288.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Mon, 7 Mar 2005 15:54:20 -0000, "MattC" <m@m.com> wrote:
True, but when was the last time Application Infrastructure codewas
generally readable LOL :p

Like I said, I do have some code that will parse a property and get its
value (or null) but figured that DataBinder.Eval (which does exacly the
same
thing) must but making a call internally to a method that already does
this.

MattC

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: ma740988 | last post by:
Consider // file fft_data.h class FFT_DATA { public: static const unsigned int Data_Words = 10; struct Data_Block_Type {
9
by: Steven T. Hatton | last post by:
It was once suggested to me that I could accomplish much the same thing that modules would accomplish (if C++ had modules) by writing my entire program - except for main() - inside of a class. ...
5
by: Dave Slinn | last post by:
Any advice on how to organize my core class library project into sub-namespaces? What are the general rules of thumb regarding cross-namespace references? Can I have a class in namespace A have a...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
20
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in...
8
by: Simon Edwards | last post by:
Something thats been bugging me for a while... how do you create a namespace that has many children (namespaces) I.e system.io.blah.blah Iv'e done it by creating a class which contains...
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
9
by: Allan Ebdrup | last post by:
I would like to use reflection to find all classes that inherit from my current class, even if they are in another assembly I want to find them if the current project has a reference to that...
17
by: Peng Yu | last post by:
Hi, I'm wondering if there is something in namespace like the 'private' keyword in class? I want to define some class or function that can only be used within that namespace. Thanks, Peng
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.