Click here to Skip to main content
15,907,396 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Where should I use the Eval and and where should I use the Bind Expression in ASP.Net? Can anyone explain that to me in detail? I used the Eval in my grid to update, but when I press edit, the whole line is disappearing.
Posted
Updated 7-Oct-10 1:10am
v3

For a read-only (one way databinding) databound control, they are the same (I'm guessing Bind has slightly more overhead since it has more functionality, but I can't confirm that).

For 2 way databinding (using a datasource in which you want to update, insert, etc with declarative databinding), you'll need to use #Bind.

Simple as that. Eval is read only, Bind allows for data to go two ways.

Why dont do a simple google search?


eval bind difference:

http://www.google.co.in/search?q=eval+bind+difference&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&redir_esc=&ei=RKutTNzTK4yCvgOi-uT0Bg[^]

 
Share this answer
 
Comments
Ankur\m/ 7-Oct-10 8:22am    
:thumbsup:
raju melveetilpurayil 7-Oct-10 19:13pm    
great ;)
Eval() is used when data is read only. If data can be updated then Bind() is used.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900