5
Answers

show and hide div with element from code behind

MR alaa

MR alaa

8y
525
1
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)