Controlling the web browser screen height and width

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
DoubtManAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ted BouskillSenior Software DeveloperCommented:
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
Shaun KlineLead Software EngineerCommented:
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
DoubtManAuthor Commented:
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Ted BouskillSenior Software DeveloperCommented:
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
Kamal KhaleefaInformation Security SpecialistCommented:
also you can use a table with fix size or use a gridview whith fiz size

Regards
0
Alan WarrenApplications DeveloperCommented:
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
Shaun KlineLead Software EngineerCommented:
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
DoubtManAuthor Commented:
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
Shaun KlineLead Software EngineerCommented:
Try this:
<table width="800">
<tr height="600">
<td width="100%"><!-- Content Here --></td>
</tr>
</table>
0
Ted BouskillSenior Software DeveloperCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DoubtManAuthor Commented:
Thanks. The key was setting up the table to fixed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.