Setting imageURL using a function in ASP.NET
问题 I've done this task before within repeaters and it has worked. However I can't get the below to work for me in a normal webforms page. The images appear as broken links and breakpoints I put in the codebehind are not triggered. (in the aspx file) <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# GetImageDirectory()%>btnRunReport.png' /> (codebehind) public string GetImageDirectory() { return "~/App_Variants/LBSX/images/"; } This is the second method I've tried, in the other one