473,242 Members | 1,817 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,242 software developers and data experts.

Problem getting HEIGHT property of a dynamic table!

Hi, all! Using VB as code-behind in asp.net page...

I have a TABLE control which I'm building dynamically. After the table is
built, I'm trying to retrieve the HEIGHT property of that table
(table.height.value) to be able to dynamically position the next elements on
the form. However, this control property is coming back as -0- every time.
I also try to get the table height with Javascript after-the-fact
(table.style.height), but that returns a blank value.

How can I get the height of the TABLE control AFTER building it, so I know
where to place the next few elements in the flow??? Very frustrating for
something that should be relatively simple...

Thanks for any suggestions!
Jack
Nov 19 '05 #1
2 2702
I think table.style.height is a client side property, so you cant detect it
in server side code. Its also a really bad choice for layout as its so
badly reprepsented in browesers that the use of it at best is typically
flaky.

Think about using panels and DIVs instead adn determine your positioning
relative to the top left (0) of the browser window..

< asp:Panel id="Panel1" runat="server" style="POSITION: absolute;
Left:910px; TOP:208px">
< /asp:Panel>

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Steve Bottoms" <sp**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi, all! Using VB as code-behind in asp.net page...

I have a TABLE control which I'm building dynamically. After the table is
built, I'm trying to retrieve the HEIGHT property of that table
(table.height.value) to be able to dynamically position the next elements on the form. However, this control property is coming back as -0- every time. I also try to get the table height with Javascript after-the-fact
(table.style.height), but that returns a blank value.

How can I get the height of the TABLE control AFTER building it, so I know
where to place the next few elements in the flow??? Very frustrating for
something that should be relatively simple...

Thanks for any suggestions!
Jack

Nov 19 '05 #2
Well, here's the thing: I'm generating a variable number of sections
(currently one row in a table) of variable length (some may be one word,
some may be 1000 words). Each of these blocks (currently generated as
multi-row tables) come one right after another. Using something like a
region with a scroll bar isn't an option. I need to be able to "look" at a
block (right now a table), get it's total on-screen height (which may be
variable: nothing is fixed height), and use that to place the next block of
text/items, which ALSO are variable. I can't use ANYTHING that's of fixed
size, because that's just plain ugly. I'm finding it a bit hard to believe
that this is so difficult.

Does the size of a Panel (never used them except to display fixed-length
text) grow based on the amount of content? Does the Panel have a height
property that can be used to determine the positioning for the next element
underneath it, or does it automatically grow, pushing later elements (Panels
& Labels) further down? Can the Panel display HTML/DHTML (the text may have
HTML; a quick test of a Panel doesn't render HTML)?

This seems like such a simple thing, I can't believe it's not available in
this day and age!! ;-)

Jack


"John Timney (ASP.NET MVP)" <ti*****@despammed.com> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
I think table.style.height is a client side property, so you cant detect it
in server side code. Its also a really bad choice for layout as its so
badly reprepsented in browesers that the use of it at best is typically
flaky.

Think about using panels and DIVs instead adn determine your positioning
relative to the top left (0) of the browser window..

< asp:Panel id="Panel1" runat="server" style="POSITION: absolute;
Left:910px; TOP:208px">
< /asp:Panel>

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Steve Bottoms" <sp**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi, all! Using VB as code-behind in asp.net page...

I have a TABLE control which I'm building dynamically. After the table
is
built, I'm trying to retrieve the HEIGHT property of that table
(table.height.value) to be able to dynamically position the next elements

on
the form. However, this control property is coming back as -0- every

time.
I also try to get the table height with Javascript after-the-fact
(table.style.height), but that returns a blank value.

How can I get the height of the TABLE control AFTER building it, so I
know
where to place the next few elements in the flow??? Very frustrating for
something that should be relatively simple...

Thanks for any suggestions!
Jack


Nov 19 '05 #3

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

Similar topics

1
by: Amar | last post by:
I have a web form with several fields. Depending on user selection in one combo box, i populate a text box and a check box in one line. For example if the user selects 2 years, then i show the...
39
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1)...
2
by: JMT | last post by:
Hello, I get some dynamic controls (ASP .Net) inside a table, the height property of the table is variable according the controls loaded, so I need to know the final table height, this value...
0
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table...
1
by: kchaitanya | last post by:
I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.