1

The goal is to allow a function to be called from within an ASPX imagebutton control that is used as part of a form. The need for an absolute URL is that Facebook Canvas applications require them. So the rendered control should look something like

<input type="image" src="http://myURL.com/images/submit.gif" />

The ASPX markup might be something like <asp:imagebutton runat="server" imageurl="<%= MyAbsoluteURLFunction("images/submit.gif)" %>" />

My sample syntax is obviously incorrect, which is why I'm here. The reason I want to use an ImageButton is because it will have events attached to it.

4

1 回答 1

0

而不是指向标记中的方法,为什么不从代码中设置绝对 URL?如果你有一个单一的图像控件,它可以在 page_init/load 中完成,并且如果你正在处理图像控件的行,比如在 Repeater 控件中,你可以处理 OnRowDataBound 事件并设置属性。

于 2011-08-10T13:06:21.077 回答