473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Show / Hide Text

Hello,

I have 2 tables in a web page.

I want to show first table and hide second when the URL parameter
result=ok.
And of course the oposite when result=notok.

How to do this?

Thanks,
Miguel

Nov 18 '05 #1
3 1697
Hi Miguel,

Create your table tags with the following attributes:

<table runat="server" id="tblMyTable">

In your code behind have this declaration:

Protected WithEvents tblMyTable As System.Web.UI.HtmlControls.HtmlTable

Then to hide the table put this in your code:

tblMyTable.Visible = False

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Miguel Dias Moura" <we****@27lamps.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have 2 tables in a web page.

I want to show first table and hide second when the URL parameter
result=ok.
And of course the oposite when result=notok.

How to do this?

Thanks,
Miguel

Nov 18 '05 #2
add the tables to individual panels (having given the panels a unique name.)
check for result parameter using
Request("result") or Request["result"]
if the value is "ok" then set the visible property of corresponding panel to
true and the other panel to false
and the otherway around if it "notok"
--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Miguel Dias Moura" <we****@27lamps.com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have 2 tables in a web page.

I want to show first table and hide second when the URL parameter
result=ok.
And of course the oposite when result=notok.

How to do this?

Thanks,
Miguel

Nov 18 '05 #3
A few ways:

1. Put each table on a "panel" control, e.g. Panel1 and Panel2, then set
..visible of each to true/false.

2. Use user controls, and do the same thing with .visible.

3. Set "id=" and "runat=server" on each of the <table> tags, then again set
..visible for the table controls (the first two ways are much cleaner).

Bill

"Miguel Dias Moura" wrote:
Hello,

I have 2 tables in a web page.

I want to show first table and hide second when the URL parameter
result=ok.
And of course the oposite when result=notok.

How to do this?

Thanks,
Miguel

Nov 18 '05 #4

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

Similar topics

10
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...
2
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 {...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
4
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however...
3
by: Merlin | last post by:
Hi there, I am trying to create a form with an dynamic field that can be shown or hidden. As I saw for example on google it is possible with JS to show a layer and move the content underneath...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
1
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
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. ...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.