我想让图片控件当鼠标移进和移出显示不同的图片

解决方案 »

  1.   

    <img onmouseout="this.style.background='images/1.gif';return true" onmouseover="this.style.backgrount='images/2.gif';return true;">
      

  2.   

    用ImageButton,把下列代码写在Page_Load事件中:
    ImageButton1.Attributes["onmouseover"] = "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';" ;或者
    ImageButton1.Attributes.Add("onmouseover","javascript:this.style.backgroundColor='#fff7ce';cursor='hand';");
      

  3.   

    哪果添加了。。我想让他响应一些事件要怎样
    比如打开数据库对DataGrid进行填充
      

  4.   

    主要是添加了ImageButton1.Attributes["onmouseover"] 
    怎样让他响应事件要怎样
    比如打开数据库对DataGrid进行填充
    那些代码要写在哪里
      

  5.   

    ImageButton1.Attributes["onmouseover"] = "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';myclick();" ;function myclick()
    {
    button1.click();
    }加一个隐藏的按键,在按键里写事件。