Visibility Issue
Hi,
I have searchable database that returns the results in a table, the headings for each field are visible before a search query has been entered. I would like the table headings to be invisible till a search has happened. How do I make this possible? In the code below I wanted to make the items in the second table below invisible initially then visible after the submit button has been clicked. Thank you in advance for any suggestions.
braheem
<html>
<head>
<title>PCCHNS</title>
<body>
<center><img src="PCCHNS.gif"></center>
<br>
<br>
<br>
<form runat="server" ID="Form1">
<table align="center" border="0">
<tr>
<td><b>First Name:</b></td>
<td><b>Last Name:</b></td>
</tr>
<tr>
<td>
<asp:TextBox id="txtFirstname" runat="server" />
</td>
<td>
<asp:TextBox id="txtLastname" runat="server" />
</td>
<td>
<input type="submit" Value="Find" OnServerClick="Button_Click" runat="server" ID="Submit1"
NAME="Submit1">
</td>
</tr>
<tr>
<td>
<asp:RegularExpressionValidator id="vFName" ControlToValidate="txtFirstname" ValidationExpression="[a-zA-Z]+"
ErrorMessage="Invalid input, try again" runat="server" />
</td>
<td>
<asp:RegularExpressionValidator id="vLName" ControlToValidate="txtLastname" ValidationExpression="[a-zA-Z]+"
ErrorMessage="Invalid input, try again" runat="server" />
</td>
</tr>
</table>
</form>
<div id="divSearch" runat="server">
<table id="Table1" height="27" align="center" cellSpacing="1" cellPadding="1" width="698"
border="1">
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Extension</td>
<td>Title</td>
</tr>
<asp:Repeater ID="repeater1" Runat="server">
<itemtemplate>
<tr>
<td>
<%#DataBinder.Eval(Container.DataItem, "FName")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "LName")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "Extension")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "Title")%>
</td>
</tr>
</itemtemplate>
</asp:repeater>
</table>
</div>
</body>
</html>
|