473,770 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
+ 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.Depar tment.Departmen tName") %>

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 2055
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******** ********@TK2MSF TNGP10.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.Depar tment.Departmen tName") %>

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.Somet hingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******** *******@TK2MSFT NGP15.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******** ********@TK2MSF TNGP10.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.Depar tment.Departmen tName") %>

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******** ********@tk2msf tngp13.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.Somet hingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******** *******@TK2MSFT NGP15.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******** ********@TK2MSF TNGP10.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.Depar tment.Departmen tName") %>

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******** ********@TK2MSF TNGP14.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******** ********@tk2msf tngp13.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.Somet hingElse) is accessible from a Reflection assembly class??

TIA

MattC
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******** *******@TK2MSFT NGP15.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******** ********@TK2MSF TNGP10.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.Depar tment.Departmen tName")
>> %>
>>
>> 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.o detocode.com> wrote in message
news:nb******** *************** *********@4ax.c om...
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
1530
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
2452
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. When it was suggested, I didn't take it very seriously, but I have recently begun wondering if it is an idea worth considering. I'm now trying to think of what fundamental differences might exist between namespace scope, and class scope. One that...
5
4276
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 function or a property that returns a class from a different namespace? For example, lets say I have a root namespace called ACME for my class library project. Under the root namespace are classes such as Individual, Address, etc. I also...
7
7439
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 = {}; com.unFocus.Namespaces = new function() { this.register = function(namespace) { namespace = namespace.split('.');
20
3871
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 a named namespace namespace foo { class Foo
8
9092
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 another class. i can see the properties of the first class and the namespace of the second (inner class) but can't see the properties of the 2nd....
4
3083
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 leads to a secondary problem involving php's __autoload feature. Since you cannot specify a namespace when calling a class that may not have been included, you are forced to store all of your classes in the same folder in your file system. This...
9
4726
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 assembly. The reason for this is that I want to check some attributes of all child classes and have the base class react to this information in the child classes. Is this possible in an easy way, or do I have to traverse all loaded assemblies and...
17
30676
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
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.