0% found this document useful (0 votes)
19 views1 page

Docs

Bind() is used for two-way data binding that allows users to modify values, such as for editing or updating. Eval() provides one-way binding and makes data read-only. When displaying data in a gridview without editing, Eval() should be used to bind the data. Bind() is used when editing information in a gridview to allow two-way binding.

Uploaded by

narayanreddym
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Docs

Bind() is used for two-way data binding that allows users to modify values, such as for editing or updating. Eval() provides one-way binding and makes data read-only. When displaying data in a gridview without editing, Eval() should be used to bind the data. Bind() is used when editing information in a gridview to allow two-way binding.

Uploaded by

narayanreddym
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Bind(): Bind method used when user can modify the value i.e for edit/update. Bind is a 2 way of   databinding i.e.

 bi­

directional databinding.

Eval(): Eval is one way Binding i.e. it is like read only.

Suppose we have a gridview control and want to only display the data, not perform any other action then we can use Eval() 

to bind the data.

If we want to edit the information in the gridview then we use Bind().

<asp : Temp la teF ie ld Header Tex t="Name">


<Ed i t I temTemp la te>
<asp : Tex tBox ID=" tx tName" Tex t= '<%# B ind ( "Name" )%>' runa t="se rve r "></asp : Tex tBox>
</Ed i t I t emTemp la te>
</asp : Temp la teF ie ld>
<asp : Temp la teF ie ld Header Tex t="Use r I d ">
<I temTemp la te>
<asp :Labe l ID=" lb lUse r Id " Tex t= '<%# Eva l ( "Use r Id " ) %>' runa t="se rve r ">
</ I temTemp la te>
</asp : Temp la teF ie ld>
</asp : Temp la teF ie ld>

You might also like