In the webpage I'm building, I have a div that I need to have hidden by default, and for it to appear when the user clicks on a link button. This is the code for the link button and the following div:
<asp:LinkButton runat="server" Text="Words & stuff go here"
OnClientClick="button_Click"></asp:LinkButton>
<div id="Calculator" runat="server" visible="false">
//CODE GOES IN HERE
</div>
And here is the code in the cs file for the link button:
void button_Click(object sender, EventArgs e)
{
if (Calculator.Visible)
Calculator.Visible = false;
else if (!Calculator.Visible)
Calculator.Visible = true;
}
I have a breakpoint inside the code behind, and when I debug, the breakpoint is never reached, and I have no idea why.