Browser Screen Resolution

Results 1 to 2 of 2

Thread: Browser Screen Resolution

  1. #1
    Join Date
    Dec 1969

    Default Browser Screen Resolution

    I&#039;ve seen a web site here or there tell me my browser&#039;s screen resolution. I checked the ASP.NET browser information, lots there, but not Display Resolution.<BR><BR>Is there a standard ASP.NET way to get this information or does it take a 3rd party library?<BR><BR>SamC

  2. #2
    Join Date
    Dec 1969

    Default RE: Browser Screen Resolution

    You could do something like this. Use a javascript function to get the width and height of the desktop then set it to a hidden form value. After the next submit you will have their desktop size. There is not a server side feature that is aware of the user&#039;s desktop size that I know of.<BR><BR>javascript function...<BR>function widthHeight()<BR>{<BR>document.forms("frmContent") .hdnWidth.value = screen.availWidth;<BR>document.forms("frmContent") .hdnHeight.value =screen.availHeight;<BR>}<BR><BR>&#060;body onLoad="widthHeight()"&#062;<BR><BR>In your form...<BR><BR>&#060;input type="hidden" id="hdnWidth" name="hdnWidth" runat="server"&#062;<BR>&#060;input type="hidden" id="hdnHeight" name="hdnHeight" runat="server"&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts