Solved

Controlling the web browser screen height and width

Posted on 2012-04-06
11
259 Views
Last Modified: 2012-04-29
Hello,

I want to write a simple asp.net app. I have my default page where I will put my details. However, when it loads, I do not want to be shown in full screen of the browser. Instead it should be in a controlled manner. Lets say I want the browser to be resized to 800x600(just like you have popups). Is there a way to control this?


Thanks
0
Comment
Question by:DoubtMan
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 37819728
No.  You are running in a sandbox that allows only read-only access to such attributes.  With a JavaScript popup window you can set the height width however most people block popups because they can be dangerous and are definitely annoying.
0
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 37820267
If you are only concerned that your details do not stretch, you could wrap your details in a DIV tag and give the tag a defined width.
0
 

Author Comment

by:DoubtMan
ID: 37820570
Hi Shaun,
Yes my concern is only for details not to stretch. Shaun can you please elaborate a bit or script that for me so that I know how that can be accomplished?

Thanks.
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 37820614
If you are working in ASP.NET then use a Panel tag and set the width attribute.  The Panel is converted to a DIV in ASP.NET.
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 37820712
also you can use a table with fix size or use a gridview whith fiz size

Regards
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 26

Expert Comment

by:Alan Warren
ID: 37821036
An Ajax ModalPopup is totally resizable and doesn't alarm popup blockers.
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx

Respectfully yours,
Alan
0
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 37821093
As tedbilly said, a Panel control will work. If you have web accessibility concerns try to avoid using a table for layout purposes, as it requires additional configuration so that screen readers can handle them.
0
 

Author Comment

by:DoubtMan
ID: 37837807
For some reason I couldnt get this work to my favour.

Can somebody please tell me how to put a table that will have a fixed size on the browser(not matter what screen size it is). Lets say I want a table always having 800x600 size. ?
0
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 37845452
Try this:
<table width="800">
<tr height="600">
<td width="100%"><!-- Content Here --></td>
</tr>
</table>
0
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 500 total points
ID: 37847525
You have to add style='table-layout:fixed' otherwise the table can grow.  The width and height are actually "minimum" values, not guaranteed to stay that size if you put an image larger than 800 it will grow bigger unless you use the style setting I provided.
0
 

Author Closing Comment

by:DoubtMan
ID: 37907951
Thanks. The key was setting up the table to fixed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
A short film showing how OnPage and Connectwise integration works.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now