How do i hide the tables created in visual studio 2010 C#? What i am trying to do is to hide the table (somewhat like timetable) and only let it appear when user click on one of the calendar dates. I tried using Visibility: hidden; but the whole table disappeared when i view on the design view. I need help! Thanks in advance.
Share
Your question is a bit unclear, but from what I understood, this is how you can achieve:
In the codebehind (C# .cs file) you can set the table as hidden using the style property, something like this:
.aspx file
.cs file in
Page_LoadThis will allow you to see the table in design mode, and when the page is rendered on client’s browser
Tablewill be hidden.Note: You cannot use
this.table1.Visible = false;in codebehind to hide the table because in this case table will never reach the client-side browser and you wont be able to show the table at all, so you should usetable1.Style.Add("display", "none");if you want to send the table to client’s browser in hidden mode.You can use JQuery or Javascript on the client side to show the table.
So when a user clicks on a calendar date you call a javascript function. This javascript function will get the Table object from DOM by Id or class and show it by setting
Style displaytoblock