|
|
 |
| 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 .
|
 |
|
|
 |

March 30th, 2009, 02:18 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
|
|
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..
|

March 30th, 2009, 03:00 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 892
Thanks: 12
Thanked 154 Times in 153 Posts
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |