473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to set the resolution of a web page created in asp.net?

how can we set the resolution of a web page created in asp.net?
Sep 6 '10 #1
6 4012
Frinavale
9,735 Expert Mod 8TB
You don't?
What are you trying to do?

-Frinny
Sep 7 '10 #2
Actually question was also asked from me in an interview so if there is any method please suggest he give me hint if this is done by checking the properties of project
Sep 7 '10 #3
Frinavale
9,735 Expert Mod 8TB
You can't really do this in ASP.NET because ASP.NET is a server-side technology. That means that it is not aware of client side stuff like "resolution". Therefore, you would have to some how check the resolution of the user's computer using a client-side scripting language like JavaScript to set the "resolution".

So, you would have to set a HiddenField or Cookie with the window's resolution using JavaScript and post back to the server (you could simply do this by calling the __doPostbackMethod). Only do this if cookie/HiddenField hasn't been set yet.

Then on the server you could retrieve this value and choose images etc according to the resolution indicated in the HiddenField or cookie.

This is a very round-about-way to do things though.
I would probably just use CSS that didn't depend on the resolution. Using things like percentages and "em" to set the height and width of things. That way I can avoid "resoultion" issues.

-Frinny
Sep 7 '10 #4
dip_developer
648 Expert 512MB
I would always prefer to set height/width of any control of my web page in percentage(%).....thats how resolution doesn't effect on the layout of your web page.....
Sep 8 '10 #5
How to set the width height of master page according to screen of different type computers?
Sep 8 '10 #6
Frinavale
9,735 Expert Mod 8TB
Have you considered setting the width of the control to be a percentage value?

Eg
Expand|Select|Wrap|Line Numbers
  1. style="width:50%;"
-Frinny
Sep 8 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
1
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
12
by: techie | last post by:
Hi All, I have a portal working on an intranet for a company. The portal was designed keeping in mind the resolution of 1024*768. I am including a ..css file in all the files. Now i have to make...
2
by: Michael Evans | last post by:
First, we rely on a stable update rate so that our physics and dynamics calculations and integrations are based on a known interval and therefore are true-to-life. Second, the graphics positions...
6
by: Darian | last post by:
I am wondering how (if it is possible of course) I can change a users screen resolution to a certain size when running my application and then change it back when they exit my application. For...
7
by: tim | last post by:
can someone tell me which function returns the screen resolution in java script?
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
2
by: Steve | last post by:
I'm trying real hard to set the printer resolution for a PrintDocument. It appears that the printer is already set to 300 x 300 dpi, which is JUST what I want. But the Margins and PrintableArea...
7
by: Peter Oliphant | last post by:
In today's market, what's a good screen resolution that I can pretty much count on as being the minimum? This is kind of a 'fuzzy' question in that I'm interested in the biggest screen...
6
by: | last post by:
Hi, I need to get the the display monitor native resolution.I have tried SystemInformation.PrimaryMonitorSize. it is giving the exisiting resolution of the display monitor that is connected....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.