I've got a web form coded behind with C#. The form has a datagrid control inside of it and within that there's a templated column that contains an imagebutton control. The imagebutton control sets the ImageUrl property as follows:
Code:
<asp:imagebutton ... ImageUrl="<%# GetImageDirectory() %>myimage.gif"...> ... </asp:imagebutton>
Now the problem is that the HTML that is output interprets the directive literally outputting as the image button's image source: "<%# GetImageDirectory() %>myimage.gif"
Now I've successfully bound date using this format as in:
Code:
Text="<%# DataBind.Eval...."
so why doesn't this work?