Click here to Skip to main content
16,015,097 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I am developing .net web application. But, i was wondering that is there a way to get a user's screen resolution in c# or javascript or jquery?

Thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 25-Oct-11 1:39am    
Even if you could, how would it help you? The sizes of Web browser's screen is decided by the user anyway, and it can be of any size.
--SA
hilmisu 25-Oct-11 1:45am    
In fullscreen with default zoom level, i want to show full background image without any scroll bars. If they resize their browser's screen, i dont care.

XML
<html>

<head>
    <script type="text/javascript">
// get width of scree
document.write(screen.width);
// get height of screen

document.write('*');

document.write(screen.height);
</script>
</head>
<body>

</body>

</html>
 
Share this answer
 
 
Share this answer
 
Comments
hilmisu 25-Oct-11 1:55am    
Thanks,
it seems, it will work. I'll let you know when i implemented it.
y do u want to know,each user may have different screen resolution!!
please explain your question briefly
 
Share this answer
 
Comments
hilmisu 25-Oct-11 1:54am    
i have an image, and i want to show it in web browser to cover all the background of the browser, but i dont want any scroll bars in the web browser. i know every user can have a different screen resolution that's why i want to know it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900