Neelima

Neelima

  • NA
  • 24
  • 16.7k

onmouseover event

Nov 15 2012 9:47 PM
when am using mouseover events in as.net with button control i want to interchange the text of buttons when mouse is over the button
i have two buttons
  
   
yes
                   
no

when the mouse is over button 'no' then the button1 text should interchange as no and button2 as yes 

i used the below code but its not working

        Button2.Attributes.Add("onmouseover", "this.value='yes'");
        Button2.Attributes.Add("onmouseout", "this.value='no'");
        Button2.Attributes.Add("onmouseover", "Button1.value='no'");
        Button2.Attributes.Add("onmouseout", "Button1.value='yes'");

why is it so?