Hi, hope someone can help
I am using this within my .aspx file:
<%#getanswer(container.currentpage)%>
%#getanswer(container.currentpage)%>
and I have this Code behind:
protected string GetAnswer (PageData page)
{
if ( this.CurrentPage["CharactersToShow"] == null )
return string.Empty;
int MaxCharacters = (int)this.CurrentPage["CharactersToShow"];
return "nuts" + MaxCharacters.ToString();
//return TextIndexer.StripHtml( page["MainBody"] as string, MaxCharacters );
}
Characters to show is on the parent page, but I can't get the code behind to execute.
Anyone got an idea on this?
Cheers
Warren
Hello!
<%#...%>
is the data binding expression syntax. Is this part of the code included in a server control that is databound? If not, this code will never be executed. Try using
<%=...%>
which is short for
Response.Write(...);