Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase
How to get current resolution of your windows using Java Script in ASP.Net (Part17)

Author: DevASP
Download Source Code : 429_Windows_resolution.zip

In this simple article you will learn that how can you get current resolution of your windows.

Simply create a asp.net application and open its HTML section and write in the head section

 

<script language="JavaScript">

 

      var scwidth=screen.width

      var scheight=screen.height

      function show_resolutionX()

      {

        alert("screen width=" + scwidth)

      }

      function show_resolutionY()

      {

        alert("screen height=" + scheight)

      }

</script>

Now write code for in body of the program

<form id="Form1" method="post" runat="server">

 

<input id=button1 type=button onclick= show_resolutionX() value="Check Screen X Resolution" />br>br>br>

 

<input id=button2 type=button onclick= show_resolutionY() value="Check Screen Y Resolution" />

 

</form>

Now when you change your resolution it tells you the current resolution.

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Display Dynamic Current Date And Time in the Title Bar of Web Page

Disclaimer - Privacy
© 2002-2014 DevASP.net