473,657 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Eval, Bind...what's the difference?


What's the difference between #Eval and #Bind?

I built a grid view control that used Bind for display.

Then I wanted to format it conditionally -- so I converted it to
DataBinder.Eval ()

It still seemed to be able to do two-way binding ( updates, inserts ).
Mar 27 '07 #1
2 8504
I think Eval is late bound, so its slower as it uses reflection, so its more
suited to template fields where early bidning is not easy to accomplish.
They both effectively do the same thing though.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"John Bailo" <ja*****@texeme .comwrote in message
news:Ir******** *************** *******@speakea sy.net...
>
What's the difference between #Eval and #Bind?

I built a grid view control that used Bind for display.

Then I wanted to format it conditionally -- so I converted it to
DataBinder.Eval ()

It still seemed to be able to do two-way binding ( updates, inserts ).

Mar 27 '07 #2
Hello,

additionally, the Bind() keyword allows two-way binding.

Best regards,
Henning Krause

"John Timney (MVP)" <x_****@timney. eclipse.co.ukwr ote in message
news:cN******** *************** *******@eclipse .net.uk...
>I think Eval is late bound, so its slower as it uses reflection, so its
more suited to template fields where early bidning is not easy to
accomplish. They both effectively do the same thing though.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"John Bailo" <ja*****@texeme .comwrote in message
news:Ir******** *************** *******@speakea sy.net...
>>
What's the difference between #Eval and #Bind?

I built a grid view control that used Bind for display.

Then I wanted to format it conditionally -- so I converted it to
DataBinder.Eva l()

It still seemed to be able to do two-way binding ( updates, inserts ).

Mar 27 '07 #3

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

Similar topics

9
8459
by: HikksNotAtHome | last post by:
This is a very simplified example of an Intranet application. But, is there an easier (or more efficient) way of getting the decimal equivalent of a fraction? The actual function gets the select values, this one is a simplified version where its passed. function checkIt(selVal){ valueInDec1 = eval(selVal); //do some calculations here with valueInDec1 }
4
2486
by: Søren Lund | last post by:
Hello, I am trying to bind a DataGrid with some data from a DataSet which contains fields in the form "group.fieldname". I am certain that my data source contains the field but I cannot get my head around which syntax to use when specifying which field to bind to the DataGrid. I have tried <%# DataBinder.Eval( Container.DataItem, "Group.FieldName" ) %>
1
2234
by: Mike Lerch | last post by:
Pretty much, TSIA, but I'll expand a bit: I'm still trying to get my head around the n-tier approach to web design. It seems to me that when you use DataBinder.Eval in the ASPX that your tiers aren't fully separated. If you're displaying data in a DataGrid, is it appropriate to define a label in your template column as <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "MyField")%>' /> or is it better to do that...
8
2945
by: Randall Parker | last post by:
I want to generate an HTML tag that will look like: <a href="EquipmentServiceCreate.aspx?serial=X01">Create New Service For X01</a> or on a different instance where the user would be viewing "X05" it would looke like: <a href="EquipmentServiceCreate.aspx?serial=X05">Create New Service For X05</a> I'm trynig to figure out how to do that using HtmlGenericControl in C# code behind.
1
2399
by: Donald Adams | last post by:
How can I use Eval or Bind with 2 values? The following does not work: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='Workitem.aspx?ID=<%# Eval("ID", "{0}") %>&WID=<%# Eval("PIID", "{0}") %>' ImageUrl="~/Images/iSelect.gif"></asp:HyperLink> Thanks in advance, Donald
2
10317
by: Arvan | last post by:
hi,all. i wanna use Eval("DataField") to bind datarow in item template of GridView. for example: <asp:Label runat="server" id="Label1" text='<%# Eval("DataField") %>'><asp:Label> but how to use eval with control HyperLink?
14
25255
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I tried a test, and I can't bind two sockets to the same port/ip but I can connect with one socket, and bind with another to the same ip/port. Thanks
1
16241
by: Owen Blacker | last post by:
I've spent loads of time Googling to try to work this one out and I'm sure it's something obvious. I get an InvalidOperationException reading "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control" when I start my page. Unless I'm missing something obvious, this is *not* the same issue as the "2-way databinding cascading lists" issue in...
1
1764
by: AlanJSmith | last post by:
Hi All, I am using ParseControl to load a formview contol from a string, some of the child controls are bound using Eval but these fail as Eval seems to have already been called within the parse leaving the databind expression blank causing an error to be raised on bind. If i use Bind instead of Eval i get the page back bound properly but of course i cant update the readonly fields so it fails on update.
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
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...
0
8617
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
7352
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...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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.