Solved

Controlling the web browser screen height and width

Posted on 2012-04-06
11
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

735 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