Hello folks,
I have a master-content form.
All the controls on the content form are server control.
When clicked on button control, a label control should become visible.
I have read the article at http://www.vanseodesign.com/css/visibility-vs-display/
But I still can’t make it visible. Here is the code so far. Could someone let me know my mistake?
<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMasterPage.master" AutoEventWireup="true" CodeFile="DynamicTextboxControls.aspx.cs" Inherits="DynamicTextboxControls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h3>Dynamic Textbox Controls</h3>
<fieldset style="width: 300px">
<legend>From</legend>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem>Database</asp:ListItem>
<asp:ListItem>Interactive</asp:ListItem>
</asp:RadioButtonList>
</fieldset>
<table border="1">
<tr>
<td class="style1"><asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Validate();"/>
</td>
</tr>
</table>
<asp:Label runat="server" id="Label1" style="display: none;" />
<script type="text/javascript" language="javascript">
function Validate() {
document.getElementById("<%=Label1.ClientID%>").style.display = "visible";
}
</script>
</asp:Content>
Thanks much