473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide Table with OnClick

Newbie here on ASP.NET

I want to hide a Table with and OnClick event. How do you do that? I'm not
showing an ID when I create a table so how do I tell it to hide it? Is
there a way to add an ID to a table? If so, how do you hide it. Please
give it to me in a format like you would for a Label (label1.visible =
False)

Thanks in advance

Phil
Jul 11 '06
10 2986
The table is in the CONTENT and I would like to do it from the server side.
Thanks!
<ne**********@g mail.comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
you could also hide it on the client side:

<table onclick=" this.style.disp lay = 'none' ; ">

cheers

neil
Phillip Vong wrote:
>I'm not talking about clicking the table. Just the button. When I give
the
<table id=table1 runat=serverand I try table1.visible = false

It tells me table1 is not defined. Maybe I forgot to mention that I'm
using
VS2005 in MasterPage and the table is in one of the contents.
<ne**********@ gmail.comwrote in message
news:11******* *************** @35g2000cwc.goo glegroups.com.. .
or do you mean when the table itself is clicked?


Aemca wrote:
"Phillip Vong" <phillip_vong*a t*yahoo*dot*com wrote in message
news:ub******* *******@TK2MSFT NGP03.phx.gbl.. .
Newbie here on ASP.NET

I want to hide a Table with and OnClick event. How do you do that?
I'm
not showing an ID when I create a table so how do I tell it to hide
it?
Is there a way to add an ID to a table? If so, how do you hide it.
Please give it to me in a format like you would for a Label
(label1.visible = False)

If you want to do it with a server side click event go with:

<table id=table1 runat=server>

then just do:
table1.visib le = false

Jul 11 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
2284
by: Michael Skind | last post by:
Hello, I use a simple Table : <TABLE> <TR 1> <TD></TD> </TR> <TR 2> <TD></TD> </TR>
7
4144
by: Mad Scientist Jr | last post by:
Through messing around I got IE6 (win xp) to show/hide a table row. I gave my <TR> an ID of "trRow" and trRow.style.display='none'; hides it trRow.style.display='block'; displays it (will any value other than 'none' display on IE6?) I tried enclosing the <TR></TR> inside a <DIV> tag, and hiding that, but it doesn't work for some reason.
5
2176
by: Zambien | last post by:
Hi all, Here's my problem. I have tables that are using the menu/submenu idea for hiding rows. This works fine in IE (of course) and does show/hide correctly in netscape, but as soon as the shown method is called, the table gets skewed and the presentation of the data on the page goes horribly wrong. I don't think this is a table issue as I have spent alot of time staring at this code. Here is the html...
10
4649
by: oLE | last post by:
I would like to add some javascript to show/hide a certain row of a table. The first row of the table contain the hyperlink that calls the javascript the second row is the one i want to show/hide with the javascript in a toggle fashion. the problem is a know very little javascript and have become incredibly frustrated because i went ahead thinking it was going to be like C. its not. I know i can use these lines to do the actual work:
2
12184
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow { display: none; }
6
1993
by: michael941 | last post by:
Hi, I have 2 tables in an html page. I have div them separately and id them as id1 and id2. I have a link there. What I need is click the link to hide one table and show the other and verse when click the link again. I tried many ways in javascript but failed. Could someone please help? Thanks a lot!
5
2138
by: Dautkhanov | last post by:
Hello all ! I have my own library for web-design building - active forms, lists. I am going to build tabbing component. The complexity in this process is that all web forms uniformed and are built as TABLEs, where each field is TR. Tabs have to show/hide some of table rows. I don't know how TR's properties must be changed in order to hide them all.
1
4169
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. I don`t want to change the way i have used to show and hide layers. check down code :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
1
1623
by: filch | last post by:
Hi, I am new to this forum ... so hello to all! I am trying to get a script working which will show or hide a table based on a user checking or unchecking a parent checkbox. This is the script I have come up with so far (note that one of my issues is whether or not you can use an if/else construct inside of a case statement): function showIt($id) { alert("ID is : $id"); switch ($id) {
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.