to change the style of div
- by ramyatk06
hi guys,
I have 2 buttons and 2 divs div1 and div2.On click button1 div1 is made visible and div2 invisible,On clicking button2 div2 is made visible and div1 is invisible.
For that i used javascript.
function showdiv2()
{
document.getElementById("div2").style.visibility="visible";
document.getElementById("div2").style.display="inline";
document.getElementById("div1").style.visibility="hidden";
document.getElementById("div1").style.display = "none";
document.getElementById("lbl_msg").innerHTML = ""
}
function showdiv1()
{
document.getElementById("div1").style.visibility="visible";
document.getElementById("div1").style.display="inline";
document.getElementById("div2").style.visibility="hidden";
document.getElementById("div2").style.display = "none";
document.getElementById("lbl_msg").innerHTML = ""
}
In div2 i have a gridview in which i have a linkbutton named lnkDelete.In its click control is going to div1.In click of lnkDelete,i want to make div1 invisible,but on clicking button1 div1 should be visible.Can anybody help to make div1 invisible in clickevent of lnkDelete in codebehind?