Hi,
It works great for me:
..
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/1.JPG" /></div>
...
protected void Page_Load(object sender, EventArgs e)
{
ImageButton1.Attributes.Add("onmouseover", "this.src='Images/2.JPG'");
ImageButton1.Attributes.Add("onmouseout", "this.src='Images/1.JPG'");
}
The Image files are under Images/ folder in my example. Please check this.
Zhao Ji Ma
Sincerely,
Microsoft Online Community Support
?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?