What is the difference between Eval and bind methods in asp.net
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sivakumar KonetiPosted Jul 1, 2019, 10:47 PM
Rajanikant HawaldarPosted Jul 1, 2019, 2:23 AM
Priyanka SinghPosted Jul 1, 2019, 2:18 AM
For read-only controls they are the same. For 2 way databinding, using a datasource in which you want to update, insert, etc with declarative databinding, you'll need to use
Bind.Imagine for example a GridView with a
ItemTemplateandEditItemTemplate. If you useBindorEvalin theItemTemplate, there will be no difference. If you useEvalin theEditItemTemplate, the value will not be able to be passed to theUpdatemethod of theDataSourcethat the grid is bound to.Rajkiran SwainPosted Aug 22, 2017, 10:10 AM