Meaning of <%#

F

Frank

I can't seem to find any mention of what <%# means in any
of my ASP.NET text books. Searching msdn and Goggle for
<%# also results in nothing. Can anyone offer a URL that
has some definition?

Thanks,
Frank
 
F

Frank

I finally found some info on <%# when searching for Data
Binding Expression Syntax. It would be nice if MS would
add <%# to the help index in VS.NET like they did with <%
=.
 
C

Carl Prothman [MVP]

Frank said:
I can't seem to find any mention of what <%# means in any
of my ASP.NET text books. Searching msdn and Goggle for
<%# also results in nothing. Can anyone offer a URL that
has some definition?

Frank,
Data binding individual control properties in Web Forms pages is not
implemented by directly tying the property to a source of data. Instead,
data binding is implemented by using a special expression format. The
data-binding expression is delimited with the characters <%# and %>.

For more information, please see:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbcondata-bindingexpressions.a
 
N

Nick

<%# ... %> isn't just used in DataBinding expressions it is used in any kind
of binding say you wanted to bind a boolean return from a method you can do
that too. You can use it on anything that is marked as Bindable(true). I
tried this out once to find the difference between <%= and <%#. = is for
string returns and # is for binding to controls.

That is what I came up with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top