Difference between <%# Bind("") %> and <%# Eval("") %>

Occassionally, I will find myself using Bind and Eval interchangeable.  I am unclea or what is the exact difference.  Can someone shed some light?

Thanks,

X

0
Xaisoft
9/19/2008 2:28:22 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
744 Views

Similar Articles

[PageSpeed] 24

Friend, it is something like this

Data-binding expressions are contained within <%# and %> delimiters and use the Eval and Bind functions. The Eval function is used to define one-way (read-only) binding. The Bind function is used for two-way (updatable) binding. In addition to calling Eval and Bind methods to perform data binding in a data-binding expression, you can call any publicly scoped code within the <%# and %> delimiters to execute that code and return a value during page processing.

For more info, refer here : http://msdn.microsoft.com/en-us/library/ms178366.aspx

http://realnero.blogspot.com/2008/07/whats-difference-between-bind-and-eval.html

Good luck!


Please Don't forget to click "Mark as Answer" on the post that helped you.
This can be beneficial to other community members reading the thread.
0
cv_vikram
9/19/2008 2:51:26 PM
Reply:

Similar Artilces:

Why is "<MyControl ... />" different to "<MyControl ...> </MyControl>"
Hi I have made a CompositeControl and had it working fine. The sequence of events was: Page -> Page_Load(), MyControl -> CreateChildControls(). This was fine because I had to set a certain property in my control during page load before CreateChildControls was called. Anyway.... suddenly it all stopped working and it turned out that the sequence of events changed to MyControl -> CreateChildControls(), Page -> Page_Load(). This caused it to blow up because the property was not set. After a few hours of pulling my hair out and undoing all the recent changes I had made it turns out...

what's the different from "<page src="">" and "<page codeBehind="">"
what's the different from "<page src="">" and "<page codeBehind="">" Thank YOU how to make session' life longer? Thank You This very question was asked only 5 days ago. Searching the forums would have yielded the answer you require. However, see this thread. Steven BeyRecursion: see Recursion You can set a new value for the Session Timeout in your web.config file. Or, you can do it in a page through this property: Session.Timeout Note that if you choose the second method, the timeout will only be modified on this page,...

"<table></table>" and "<frameset><frame></frame></frameset>" in perl/tk
Dear my friends... Anybody would be so kind telling me what is similar in perl/tk to arrange the location of a form written in perl/tk? I want a nice look for my perl/tk application. Somewhat like this below: 1. Name : <place to type-in> 2. Address : <place to type-in> 3. Telephone : <place to type-in> I have made the main menu of my application with "Menubutton". And I want if the user click on the menu that what the user see is only the aimed application displayed on the determined area (under the main menu) but the menu has no change in po...

What is this for? "<label style=""display:none;"" for=""" & cboFieldType.ClientID.ToString & """>Type</label>"
I'm digging through the code of DNN and I found many ocurrences of this type of code: lblFieldType.Text = "<label style=""display:none;"" for=""" & cboFieldType.ClientID.ToString & """>Type</label>" What is that code for? The label is never displayed and I could not figure out what DDN uses it for. thank you This is for ADA compliance. The guidelines require that form elements have an associated label. This helps the text readers out with identifying the different parts of the form. BruceDynamic...

"<->" as "->" with automatic "is rw"
I like that arguments will be readonly by default. But when I look at my current code, I see that I would be typing " is rw" quite a lot, which in my opinion is too long for a thing that occurs very often. Every such situation in my code is a foreach loop. A thing that in Perl 6 will mostly be used with the pointy sub declaration syntax. If I'm not mistaken, <-> is still available. It communicates "bidirectional" and that is more or less the same as read/write access. I'm proposing for zip(@foos, @bars, @xyzzies) <-> $foo, $bar, $xyzz...

Regular Expression to remove "/", "\", "<", ">" and "="
Can anyone please show me the regular expression to reject a string ("<blue", "right>" etc.) which has the following expression in it: "/", "\", "<", ">" and "="  hi, It may Help u.. it is in Class file u may use this expressin in validation controls also. Regex objReg = new Regex(@"^[^,.?/\~|`;:'<>]*$", RegexOptions.Singleline); Regex objReg = new Regex(@"^[^,][^.][^?][^/][^\][^~|][^`][^;][^:][^'][[^<][^>]$", RegexOptions.IgnoreCase);Thanks &...

"Florian Ragwitz" <rafl@debian.org>, "Zefram" <zefram@fysh.org>, "Father Chrysostomos" <sprout@cpan.org>,
--0015175884b6a300aa04a8916f03 Content-Type: text/plain; charset=UTF-8 Howdy all. Bit of a slow week, as I didn't have net access for a couple of days. It was awful, and doesn't leave me with that much to report; But on the other hand, it was an awesome week - Midterm passed, the pad stuff got merged, and all the bugs in that started popping out. Fun : ) I'll follow up on that in another mail, so back to last week. With the pad merge, getting our and the error messages with scalar filehandles working done was only a few lines, which makes several TODO tests to pass;...

superreview cancelled: [Bug 226958] Bug 197315, "other" files: Convert <window class="dialog"> to <dialog> : [Attachment 137491] (Cv2) <Wallet*.*> (+ <*pref*>)
Serge GAUTHERIE <gautheri@noos.fr> has cancelled Serge GAUTHERIE <gautheri@noos.fr>'s request for superreview: Bug 226958: Bug 197315, "other" files: Convert <window class="dialog"> to <dialog> http://bugzilla.mozilla.org/show_bug.cgi?id=226958 Attachment 137491: (Cv2) <Wallet*.*> (+ <*pref*>) http://bugzilla.mozilla.org/attachment.cgi?id=137491&action=edit ...

superreview requested: [Bug 226958] Bug 197315, "other" files: Convert <window class="dialog"> to <dialog> : [Attachment 137491] (Cv2) <Wallet*.*> (+ <*pref*>)
Serge GAUTHERIE <gautheri@noos.fr> has asked Ben Goodger (I don't read bugmail) <bugs@bengoodger.com> for superreview: Bug 226958: Bug 197315, "other" files: Convert <window class="dialog"> to <dialog> http://bugzilla.mozilla.org/show_bug.cgi?id=226958 Attachment 137491: (Cv2) <Wallet*.*> (+ <*pref*>) http://bugzilla.mozilla.org/attachment.cgi?id=137491&action=edit ...

"<Signature>" vs "<ds:Signature>"
I am signing an xml document and it seems to work fine except my signature elements are coming out like "<Signature>" but in my documentation the have a "ds:" in front of them like "<ds:Signature>" Can anyone tell me what the difference between these are or what I might be doing wrong. Thanks This may be of some use: http://msdn.microsoft.com/library/en-us/xmlsdk/html/digitalsignatures_ref_elements.asp Scottscott_ttocs46@yahoo.com The difference is in the namespace declaration. The ones prefixed with 'ds' have declared that to be...

How do I turn an "<instance>" into an"<add>" event
Hi all, I am trying to migrate AD users into eDir. In eDir, I need to store them as two separate classes (USER and AuxUSER). My question is, when I migrate, this is seen as an "<instance>" event. Is it possible to change an "<instance>" into and "add" at the input transform policy on the publisher channel? If so, any suggestion would be greatly appreciated. Thanks. Don't try to turn instances into adds - it won't accomplish anything but confuse the IDM engine. Are you trying to store each AD User as two different objects in eDi...

problem with <%if Container.DataItem("content")<>""%>
when i am writing this: <%if #Container.DataItem("content")<>"" then%> <tr> <td>&nbsp;</td> <td class="textlightBG"><%# Container.DataItem("content")%></td> </tr> <%end if%> i get the error Compilation Error you cannot split one statement into multiple fragments using databinding sintax.(<%#) Consider using IIF statement insteadBug [MCSD] You may use a HelperFunction. You create the function in the .vb (.cs) file and uses it like this: <...

superreview requested: [Bug 427928] "ASSERTION: Non-border-colors case with borderColorStyleCount < 1 or > 3" and "ASSERTION: Unhandled border style" with <table style="outline: auto; "></table> : [At
Mats Palmgren <mats.palmgren@bredband.net> has asked David Baron [:dbaron] <dbaron@mozilla.com> for superreview: Bug 427928: "ASSERTION: Non-border-colors case with borderColorStyleCount < 1 or > 3" and "ASSERTION: Unhandled border style" with <table style="outline: auto;"></table> https://bugzilla.mozilla.org/show_bug.cgi?id=427928 Attachment 314802: Patch rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=314802&action=edit ------- Additional Comments from Mats Palmgren <mats.palmgren@bredband.net> Not sure...

superreview denied: [Bug 427928] "ASSERTION: Non-border-colors case with borderColorStyleCount < 1 or > 3" and "ASSERTION: Unhandled border style" with <table style="outline: auto; "></table> : [Attac
David Baron [:dbaron] <dbaron@mozilla.com> has denied Mats Palmgren <mats.palmgren@bredband.net>'s request for superreview: Bug 427928: "ASSERTION: Non-border-colors case with borderColorStyleCount < 1 or > 3" and "ASSERTION: Unhandled border style" with <table style="outline: auto;"></table> https://bugzilla.mozilla.org/show_bug.cgi?id=427928 Attachment 314802: Patch rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=314802&action=edit ...

Web resources about - Difference between <%# Bind("") %> and <%# Eval("") %> - asp.net.presentation-controls

Resources last updated: 12/23/2015 9:27:24 AM