.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to fix the height of the table to be same as the screen size?

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
hi,iam trying to have my web page design inside a table that fills the screen in width and height.i tried like this<table  border="0" cellspacing="0" cellpadding="0"                         style="width:100%; height:100%; margin-right: 0px; margin-left:0;margin-top:0; margin-bottom: 0px;">            <tr> etc...the table width is filling 100 % but the height is not expanding to the bottom of the screen.my aim is to have a column in the table that looks like a left pane and it will contains dynamically added controls so if there is controls or no the column will have the height of the screenthanks for the help

View Complete Post

More Related Resource Links

Detect Browser Screen Size??


Hi Everyone,  I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!

  How does anyone reliably get the browser's screen size?? Do I have to revert to some kind of JavaScript? If so, where can I read more about it? Will it be any more reliable? Someone must have an idea about this. Thanks in advance!!

Obtain mobile device screen size



I am trying to get the screenHeight and width:


 // Get MobileCapabilities from current Request.Browser
        MobileCapabilities currentCapabilities = (MobileCapabilities)Request.Browser;
        // get a property of the  browser 
        Response.Write(currentCapabilities.ScreenPixelsHeight +  " <br>");
        Response.Write(currentCapabilities.ScreenPixelsWidth  + " <br>");


 but this is always show that the Height is 480 & the width is 640

I am trying on HTC with Opera Mobile 9.5

Any Advice?

determine the screen height within javascript and set a property on an iframe


I have a webform  that has a header and iframe,  what I need to do is on load detemine the users screen height and then  set the height on the iframe. Can someone explain  or show me an example of how to do this.

Thanks in advance.

WPF control size is larger than explicitly set width and height values.

I created a Canvas with fixed Width and Height (256x256). Next to it I put an Image control displaying a 256x256 texture without stretching. How is it possible that actual sizes of both controls on the screen differ so much? Here - is the screenshot illustrating size mismatch. And here - the TestLines256.png in case someone liked to check it (and maybe point out that I'm stupid and this texture is 180x180 and not 256x256 as I claimed). XAML with creation of the controls:   <Window x:Class="OversizedQuad.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" SizeToContent="WidthAndHeight"> <StackPanel Orientation="Horizontal"> <Canvas Width="256" Height="256" Background="Red" /> <Image Stretch="None" Source="TestLines256.png" /> </StackPanel>

How to calculate a SQL Server performance of a query based upon table schema, table size, and availa

Hi What is the best way to calculate (without actual access to a SQL Server) the processing speed of a query (self-inner-join) based upon table schema, table size, and hardware (CPU, RAM, Drives)? ThanksThanks Jeff in Seattle

How to Control each cells width and height of a Table ?

Hi, I want to fix the size of each cells of a table . for that i used Style like this: <td style="width:10px;height:10px"> contents </td> But it seems that there is no any effect of applying these settings.How can  i set its width and height. It seems that it purely depends on the contents of cells. Now, if suppose there are two rows, <tr id='r1'> <td id='d1'> content of size 10px </td> <td id='d2'> content of size 10px </td> </tr> <tr id='r2'> <td id='d3'> Content of size 400px </td> <td id='d4'> content of size 20px </td> </tr>   Then cell of id 'd1' will get a size of 400px ,since its just below cell is of size 400px. I want to fix its size. Is that possible ?  

Bar-graph style - how to keep columns in relative height of size of "graph"

Hi, I need some input for this and imagined that someone else had seen something like it: I have a box, let's say a grid, where there are some bars in it. These bars could be rectangles in a ItemsControl. The grid has a fixed height and width - but the rectangles' height (and width) are set a from a collection of numbers. These numbers go from 0 to 200 - but in periods the numbers only go from 1 to 10. If I use absolute numbers, the rectangles will be tiny in height or width if the numbers are between 1 and 10 and the Grid is 200 in height and width. How do I make the size of these rectangles relative to the tallest one? I guess I could do some calculations 'behind the scenes' in code, but is that really necessary? Is there no other way? Thanks! --Anders

Button height doesn't increase with larger font size

Hi, I've got a couple buttons in a StackPanel that aren't increasing when I increase the font size. I think it has to do with the VerticalAlignment but I'm not catching what's going on. Here is the xaml: <StackPanel Grid.Row="3" Grid.RowSpan="1" Height="Auto" HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Stretch" Width="Auto" Orientation="Horizontal"> <Button Background="#FF7F3F96" BorderBrush="{x:Null}" Content="exit" FontFamily="Myriad Pro" FontSize="12" Foreground="White" Width="Auto" MinWidth="74" Margin="23,8,11,9" /> <Button BorderBrush="{x:Null}" Content="new" FontFamily="Myriad Pro" FontSize="12" Foreground="White" RenderTransformOrigin="-0.243,0.516" Width="Auto" MinWidth="74" Margin="11,8,11,9"> <Button.Background> <SolidColorBrush Color="{DynamicResource Green}" /> </Button.Background> </Button> </StackPanel>

Contract the Screen.PrimaryScreen.WorkingArea.Height

Hello. I have been developing a Windows Form Application that works as an alert system for my computer, and the form is docked at the bottom of my screen. What I want to do is contract the Screen.PrimaryScreen.WorkingArea.Height by the height of my Windows Form. That way, instead of me having to move my icons from underneath of my application, they will automatically be moved by the operating system due the the contracted Screen.Primary.Screen.WorkingArea.Height.

Here is what I want:


Here is an example of exactly how big I want the working area.  The red rectangle around visual studio represents the working area I want.


I played with some of the properties in the Screen.PrimaryScreen.WorkingArea class and was not able to reach success with my approaches as each time I tried something it gave me compiler errors saying that the properties were either not accessable or are cannot be used like variables.

If anyone knows how to contract the height of the Screen.PrimaryScreen.WorkingArea, please, let me know.

Thank you in advance,
Dave S. Anderson
Owner of DCOM Productions

Setting the canvas height and width to Grid size


I have a canvas and I have it set to the following attributes


 Grid.Row="1" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2"


However I want the canvas height and width to fill those locations. Also upon window resize i want the canvas height and width to adjust accordingly.

Any ideas? Thanks all

can table size will remain same if any of columns are hidden


Hi all...

im haveing table where columns will hide according to condition but if any of the column is hidden table size must  be same as all columns in table .

i have employeedetails table :



ID Number






How to GET the Height of a Table programmatically in SSRS 2005?


Im fairly new to SSRS and all attempts to align my table at the Bottom of the page has failed. (similiar to a footer)

I cannot use a footer to do this because the footer allocates space on every page even tho i require the data on the last page only.

I have tried the solutions given to me on the following link: http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/08785944-923e-445a-b7de-b1062ea97879/

Unfortunately i cannot seem to GET the Height of the preceeding content (which is in a table).

Any help will be much appreciated!


Three-row table with 100% height without using Quirks mode


I have an app that was running inside of SharePoint 2007 (Quirks mode)  which has something like


html - height: 100%;

body - height: 100%;

table - height: 100%;

tr (row 1) td - height: 115px; (header)

tr (row 2) td - no height specified, hope to be remaining of 100%; (content area)

tr (row 3) td - height: 30px; (footer)


In quirks mode, this works, making the middle area the largest and always keeping the header at 115px and the footer at 30px. In document standards mode, it tends to just make the footer larger than the 30px specified. If I put a height:100%; attribute on the middle row it STILL makes the footer the largest container but also adds a scrollbar (I believe it is adding the height of the header as well when rendering the page). How can I handle this? Thanks!!

how to set the height of table row details become auto in report viewer?



i facing a problem how to set the height of table row details become auto in report viewer? 

due to my data maximum length is 300, however some data may be short till 10 characters.

how to make the height become auto and depends on the content of data?

By default row size allocated in a table

What is the by default row size allocated in a table on HDD in sql server.

hide webpart if screen size lower than 1280

Hello all,

I am using a webpart zone control and I need to set it to visible if the screen resolution of the user is nore then 1280 pixels.

How do I do that?


Screen Height and Width


Hi all

I am displaying image on page load event.  I have difrent sizes image i want to get screen.width and screen.height values by javascript on page load event and then using to get particular size's image on page load event in asp.net with c#.

If browser not support javascript then default size will display.

Plz help to resolve this


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend