Solved

Auto Resize web form to fit the screen size

Posted on 2007-03-22
4
2,474 Views
Last Modified: 2011-09-20
I want a script to be included in all web pages that will automatically Adjust / Resize a web form height and width to fit the screen size..
i'm using ASP.NET 2.0 with C#
0
Comment
Question by:Collindsouza
  • 2
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
ethoths earned 500 total points
ID: 18771012
Stick this in your master page.
Note that it's not really necessary to do this on every page though. A better way would be to do it on your entry page and then detect the users attempt to resize / move the page.

<script for="window" event="onload">
  window.moveTo(0,0);
  window.resizeTo(screen.availWidth,screen.availHeight);
</script>
0
 
LVL 5

Author Comment

by:Collindsouza
ID: 18772817
Thanks for your help...
Just one more thing..
How do i enable scroll bar if the window is resized by the user??
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18772938
BNot sure what you mean. The scrolbar is automatic and will appear if needed. This is unless you opened the window as js window.open and explicitly set scronlebars to none. If so just set them to auto. Full window.open syntax can be found here

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
0
 
LVL 5

Author Comment

by:Collindsouza
ID: 18772974
sorry...

The scroll bar is automatic ..

many thanks for your help...

Collin
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 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

20 Experts available now in Live!

Get 1:1 Help Now