Thursday, January 14, 2010

How to hide an HTML table row in ASP.NET

1. In your ASP.NET (.aspx) page in your table row () tag do the following:

Notice: The id is what you normally access controls with, and should be named something that will be easier for you to remember and not conflict with other controls. Therefore by convention it should be named rowID, where ID is some unique identifier for that row.

2. In your page behind code (.aspx.cs or .vb) you can now reference your row control by it's id. Do the following:
rowID.Visible = false;


No comments:

Post a Comment