Hi Guest

HomePage

1 1

To improves our performance please Like Share Subscribe(Will boost us)

Difference in between Bind and Eval function in dotnet?
Question Posted on 11 Dec 2023

Home >> DotNet >> ASP.NET >> Difference in between Bind and Eval function in dotnet?

Difference in between Bind and Eval function in dotnet?
Below are the difference in between Bind and Eval function in asp.net:-
0
0

NumberBase of differenceBind FunctionEval Function
1BindingWell when we say about the Bind function , it used for two-way binding (Write and Read). For example when you want to update any database field, here you will be using TextBox and thus by using bind function.Well when we say about the Eval function, it used to define one-way binding(Read only). For example when we say control like GridView or the FormView. We use this to display read only data by using a label control. We will use this function.
2USed For Well when we say about the Bind function it can be used to bind data to control inside a DataBound control and also it can update the values back to database.Well when we say about the Eval function, it can be used to bind data to control inside a DataBound control, but it cannot update the values back to the database.
3MethodWell when we say about the Bind function,it is a new ASP.NET 2.0 databinding keyword. It is not a method of any specific class.Well when we say about the Eval function, it is protected method define on the template control class, from which the Page class is derived.
4ControlsWell when we say about the Bind function, it applies to control like the GridView, FormsView and Detailsview.Well when we say about the Eval function, it applies to control like the GridView, DataList, Repeater, ListView, FormsView and DetailsView.
5Control ID It does not need the ID of a particular control. For example :- <table> <tr> <td><%#Eval("productname")%> </td> </tr> </table>It always needs the ID of a particular control. For Example:- <table> <tr> <td><%#Bind("productname")%> </td> </tr> </table> is WRONG. We have to take some UI control like Label and specify the Binding in the Text property. e.g., <ItemTemplate> <asp:Label ID="lblDOB" runat="server" Text='<%# Bind("DOB") %>'></asp:Label> </ItemTemplate>


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions
Use of Calendar control in dotnet with code
How to improve Front End UI performance of dotnet web application?
File upload in dotnet
reverse a string
function of garbage collector






Most Visited Questions
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |
     
 
Privacy policy | Terms and Conditions | Blog


If the copyright of any questions or content or syntax belong to you email us we will remove that(info@crackyourinterview.com or crackyourinterview2018@gmail.com)
 

1
Home About Us GroupChat
 
Sitemap Feedback Contact us