The <%= ... %> executed during rendering. But the object ImageButton is
created at the very beginning when Page is initialized.
That would explain why it does not work.
You simply can not attach to property of the ImageButton logic that is
executed during rendering. It has not run yet.
---------------------------
<%# GetMyButtUrl() %> called binding. To tell you the truth I am not sure
how it works. But my guess the .NET parser simply puts the code ImageUrl =
GetMyButtUrl(); when converts aspx page to C#.
So in your example simply replace <%= with <%# and it might work.
I am saying might because i am not sure how exactly <%# %> works and if any
additional things required from the object (in your case ImageButton) to
make it work.
George.
> Hi,
>
[quoted text clipped - 22 lines]
> Regards
> DC
DC - 30 Jul 2007 14:56 GMT
> The <%= ... %> executed during rendering. But the object ImageButton is
> created at the very beginning when Page is initialized.
[quoted text clipped - 43 lines]
>
> - Zitierten Text anzeigen -
Thank you, George. I tried using <%# ... %> outside a template, but it
does not work.
Regards
DC