If I use the following code without runat=”server” the input’s src works fine and I see the image coming through.
<div><input id="testButton" type="image" src="<%=TestButtonImageUrl %>" onserverclick="RedirectTest" /></div>
url is https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image
But if I put the runat=”server” in, for some reason, I get this for the url:
<div><input id="testButton" type="image" src="<%=TestButtonImageUrl %>" onserverclick="RedirectTest" runat="server" /></div>
You cannot use the
<%= %>syntax with server controls (including standard HTML elements withrunat="server"). You have two choices:HtmlInputControl) and assign the src attribute using theAttributesproperty:imageControl.Attributes["src"] = value;src="<%# %>") and callimageControl.DataBind()from the code behind