Click here to Skip to main content
15,914,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to change ImagMap.imageurl when onmouseoverhappen
what should i do?
Posted
Comments
BillWoodruff 19-Sep-11 4:50am    
What are you doing now ?

1 solution

XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">        
        function change(x) {
            x.src = "../Images/out_button.png";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
<asp:image id="Image1" runat="server" imageurl="~/Images/in_button.png"/>

<asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="~/Images/in_button.png">
    
    </form>
</body>
</html>


Code Behind Page

C#
protected void Page_Load(object sender, EventArgs e)
{
    Image1.Attributes.Add("onmouseover", "change(this);");
    ImageMap1.Attributes.Add("onmouseover", "change(this);");
}


you can perform using this javascript...
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900