Hiding table rows at run time in vb.net

G

Garg

How do I hide a paricular tablerow during run time?

I have two table rows with ids row1 and row2.
I want that if a particualr condition is true, then row 1 should be
displayed on the web page, otherwise row2 should be dispalyed.

I tried following code, but it is not working:

row1.Style.Value = "block"
row2.Style.Value="None"

But, still both the rows are being displayed. How do I achieve the
desired functioanlity of hiding one row while displaying teh other row
at run-time.

Please help me with this....
 
T

Thomas Hansen

How do I hide a paricular tablerow during run time?

I have two table rows with ids row1 and row2.
I want that if a particualr condition is true, then row 1 should be
displayed on the web page, otherwise row2 should be dispalyed.

I tried following code, but it is not working:

row1.Style.Value = "block"
row2.Style.Value="None"

row1.Style.Add("display", "none"); for instance...!
But for this operation you would normally want to build that table
dynamically and then DON'T build the rows that's not supposed to be
shown...
Preferable with some Ajax Framework...!!

..t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top