Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show hidden table using VB 1

Status
Not open for further replies.

mapman04

IS-IT--Management
Mar 28, 2002
158
US
I have an ASP.NET page where I want to display a table after the users clicks a button. I have the table hidden when it loads but can't figure out how to unhide it. I was trying this tblQty.style.visiblity="visible", but it errors out. How can I make it visible using VB?

Thanks in advance,

mapman04

Here's my table:

<table ID="tblQty" border="0" cellspacing="0" cellpadding="0" style=visibility:Hidden>
<tr ID="tbQt1">
<td><asp:Label id="lblQty" runat="server" Text="Enter Quantity: " /></td>
<td><asp:TextBox id="txtQty" CssClass="textbox" runat="server" Text/></td>
</tr>
</table>
 
I get name "tblQty" is not declared.

Here's the HTML part of the page:

<form ID="frm" runat="server">

<p>Select MO Line:<br />
<asp:DropDownList id="ddlMOInfo" CssClass="dropdownmenu" runat="server" /></p>

<p><asp:Button id="btnSubmit" OnClick="getData" Text="Get MO Info" runat="server"/></p>
<p><asp:Repeater id="myRepeater" runat="server">
<HeaderTemplate>
<table>
<tr>
<th>MO Info</th>
<th>Item</th>
<th>Description</th>
</tr>
</HeaderTemplate>
<Itemtemplate>
<tr>
<td><%# Container.DataItem("fldMO") %></td>
<td><%# Container.DataItem("fldItem") %></td>
<td><%# Container.DataItem("fldDesc") %></td>
</tr>
</Itemtemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater></p>
<br />

<table ID="tblQty" border="0" cellspacing="0" cellpadding="0" style=visibility:Hidden>
<tr ID="tbQt1">
<td><asp:Label id="lblQty" runat="server" Text="Enter Quantity: " /></td>
<td><asp:TextBox id="txtQty" CssClass="textbox" runat="server" Text/></td>
</tr>
</table>

</form>
</body>
</html>
 
ohh.. sorry I thought it was a asp table..

I think you will need to use panels to hide groups of control such as tables.

 
place an asp panel on your form. set visable = false. place the controls you wish to hide into the panel. then when you need those controls to display simply do Panel1.Visabel = True.. then your controls will display.

 
Or, you could add runat="server" to your existing table and then you will be able to access it via code.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top