HTML
<img src="~/UserControls/Vote/Images/Arrow Up.png" id="VoteUpOff" runat="server" alt ="vote up" class="voteupImage" style="height: 45px; width: 44px" />
server side
if (someCondition) { VoteUpOff.Attributes["src"] = ResolveUrl("~/UserControls/foo.png"); }
Keep in mind to see the changes you should put "img" in the UpdatePanel. After making changes. Update UpdatePanel if its UpdateMode = Conditional, otherwise it will be automatically updated if its ChildAsTriggers = True property
source share