<script type="text/C#" runat= "server"> protected void Page_Load(object sender, EventArgs e) { label1.Attributes.Add("onclick", "label2show()"); } </script>
<script type="text/javascript"> function label2show() { document.getElementById('label2').innerHTML = 'show data'; } </script>
<asp:Label runat="server" ID="label1">Press it to show and hide data on label 2</asp:Label> <asp:Label runat="server" ID="label2"></asp:Label>
javascript
function label2show() { if(document.getElementById('label2').innerHTML == '') document.getElementById('label2').innerHTML = 'show data'; else document.getElementById('label2').innerHTML = ''; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)