MR alaa

MR alaa

  • 1.1k
  • 631
  • 21.4k

show and hide div with element from code behind

Apr 6 2016 4:15 PM
hi every body 
i want to switch between two divs on mouse over using code behind i try this but no way
how it can be done ???
this is my code
 
< div id = "myDiv" runat = "server" >
< p > triallllllll </ p >
</ div >
 
< div id = "myDiv2" runat = "server" >
< p > triallllllll </ p >
</ div >
 
 
in code behind by default 
myDiv.Style.Add("display", "");
 
how can i make mydiv hidden and mydiv2 is visible on mouse over ???
my page is inherted from masterpage 
 

Answers (5)