Reputation: 33
I have the following HTML:
<td align="center">
<%#CreateDynamicHTML()%>
The <%# %> tags, whatever they're called, are meant to point to a code behind function. Here is my function:
Public Function CreateDynamicHTML() As String
Dim html As String = String.Empty
'create lots of HTML
Return html
End Function
It compiles but the function does not run. Put a break point in there, doesn't get hit. What's going on?
Upvotes: 0
Views: 45
Reputation: 171
The # symbol is for databinding. The = symbol is short for Response.Write. Try using <%=CreateDynamicHTML()%>.
Upvotes: 1