p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
I forgot my password
Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 30th, 2009, 02:18 PM
Friend of Wrox
Points: 844, Level: 11
Points: 844, Level: 11 Points: 844, Level: 11 Points: 844, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna Send a message via Skype™ to dpkbahuguna
Default DataBinder.Eval(Container.DataItem, "Role")

hello friends!!

pls tell me wht is the difference between them, they all work same...

<%# DataBinder.Eval(Container.DataItem, "Role") %>
<%# Eval("Role") %> // TemplateControl
<%# Bind("Role") %>


waiting for reply..
thanks!!!
__________________
DPK..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 30th, 2009, 03:00 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,694, Level: 28
Points: 4,694, Level: 28 Points: 4,694, Level: 28 Points: 4,694, Level: 28
Activity: 70%
Activity: 70% Activity: 70% Activity: 70%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 892
Thanks: 12
Thanked 154 Times in 153 Posts
Default

Nos. 1 and 2 are in fact the same. The shorter way of calling the Eval method was introduced in .NET 2.0.

No. 3 is different. Eval only allows one-way "read" operations, while Bind allows two-way "read" and "write." If you are only selecting records and binding them to a display (say, a Label), they appear to work the same. However, if you want to be able to update records and persist them back to the database (from say, a Textbox) you need to use Bind.
__________________
Author of the upcoming ASP.NET 4.0 Website Programming: Problem - Design - Solution

Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading a files general property of "Type of file" GregSivers Visual Basic 2008 Essentials 7 June 3rd, 2009 09:38 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM
Chapter-5 on Intents:ContactPickerTester does not show the button "Pick a Contact" sunilm12 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 April 15th, 2009 11:55 AM
WebPart not supporting/enabled displaymode other than "Browse" amitjoshipune ASP.NET 2.0 Professional 1 January 9th, 2009 01:34 PM
DataBinder.Eval(Container, etc. - Please explain pete_m ASP.NET 1.0 and 1.1 Basics 1 June 25th, 2004 11:52 AM



All times are GMT -4. The time now is 01:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Wiley Publishing, Inc