to change the style of div

Posted by ramyatk06 on Stack Overflow See other posts from Stack Overflow or by ramyatk06
Published on 2009-09-07T08:44:35Z Indexed on 2010/05/02 20:08 UTC
Read the original article Hit count: 274

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about vb.net