G
Guest
Hi. I want to write a function that will show or hide a few elements on the
client-side. The elements that I'm working with are, for example, an
<asp:Label />.
Let's say I have:
<asp:Label id="SomeLB" runat="server" Text="Hi there" />
For the C# to generate my JavaScript, I know that I have to use the
ClientID, and the one line I was using looked like:
SomeLB.ClientID + ".visible=false;";
Got a JavaScript error so I tried...
SomeLB.ClientID + ".style=\"visibility:hidden;\";";
What's the right way to do this?
Alex
client-side. The elements that I'm working with are, for example, an
<asp:Label />.
Let's say I have:
<asp:Label id="SomeLB" runat="server" Text="Hi there" />
For the C# to generate my JavaScript, I know that I have to use the
ClientID, and the one line I was using looked like:
SomeLB.ClientID + ".visible=false;";
Got a JavaScript error so I tried...
SomeLB.ClientID + ".style=\"visibility:hidden;\";";
What's the right way to do this?
Alex