Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6657091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:43:27+00:00 2026-05-26T01:43:27+00:00

I generate a HTML-Page from C#. In the HTML-Page there are a lot of

  • 0

I generate a HTML-Page from C#. In the HTML-Page there are a lot of elements. All of them have a absolute position.

One of these elements is a table. This table represents a object that keeps a double[]. Every double value is a new cell in a new row.

I iterate over double[] and create my table:

for (int i = 0; i < dbl.Length; i++)
{
  htmlTextWriter.RenderBeginTag(HtmlTextWriterTag.Tr);
  htmlTextWriter.RenderBeginTag(HtmlTextWriterTag.Td);
  htmlTextWriter.Write(dbl[i]);
  htmlTextWriter.RenderEndTag(); // td
  htmlTextWriter.RenderEndTag(); // tr
}

If the table has so much elements, that it cross an element that is below this table, I have to be responsive to this issue.

This means, I need to know how many pixels this table is long.

Of course I do know how many cells I generate and I also know BorderSize, Padding, Margin, etc.

But there are two problems. First although I know FontSize, FontFamily, FontWeight, I do not know how to include these information into a mathematical calculation.

Second I think in every browser the actual size is also different. I created a dummy table and recognized, that in one screen height I already have one cell difference between Opera and Firefox.

So I think in C# I am only able to approximate the actual height?!

The next idea I have is to include a JavaScript into my HTML. I’ve no experience with JavaScript, but my approach would be to find my tables and read out size. Then iterate over all elements and find all overlappings.

My questions are:

  • Are my consideration true or do I miss some aspects?
  • Are my approaches the right way (in C# I only will get an
    approximated result?!, JavaScript I do not know if it is really
    possible what I want to do)
  • Are there other possibilities I do not see right now?

Hint: Other script languages than JavaSript are not applicable for my solution. JavaScript I only use if really necessary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:43:28+00:00Added an answer on May 26, 2026 at 1:43 am

    I think javascript is the answer, not c#.
    http://api.jquery.com/height/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML page that I generate from the data contained in a
I have a master page that gets all its images from a table on
As I mentioned here , I'm trying to generate HTML from an ASPX page
Problem: I have a user who would like to generate an HTML page directly
I am using ABCPDF.net to generate my PDFs from HTML files. There are 3
I did some searching to try and generate jpg files from an html page
I use XSLT to generate an HTML table using info from an XML file.
I am trying to generate a html page with css that works as an
I'm interested in selectively parsing Mediawiki XML markup to generate a customized HTML page
I want to conditionally output HTML to generate a page, so what's the easiest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.