In your code there are some errors :
The <%= construct can only be used in client script for write some value
from server (like old ASP).
your Image is server side not in client side!!!!
You can use the <%# construct. This is for binding value!
<asp:Image id="Image1" runat="server"
ImageUrl='<%#System.Configuration.ConfigurationSet tings.AppSettings["SrcImgS
istema"]%>' />
this code require a DataBind() method call!!!
Brun
"Marcos MOS" <ma***********@softway.com.br> wrote in message
news:ul**************@TK2MSFTNGP12.phx.gbl...
Hi,
I've put a appSetting tag into my web.config, but when I try to catch its
value to my Image WebControl occurs the follow error: "Server tags cannot
contain <% ... %> constructs."
on myPage.aspx (Notice the ImageUrl tag):
<asp:Image id="Image1" runat="server"
ImageUrl=<%=System.Configuration.ConfigurationSett ings.AppSettings["SrcImgSi stema"]%> />
So, What's wrong with my ImageUrl attribution?
Is there any way to do that?
thanks a lot
Marcos