get screen resolution
-
I have a ASP.Net web application using C#, is there a way for me to get the PC screen resolution? I think I have to use javascript for this, but I don't know the syntax. If I have to use javascript, how do I get the value from the javascript variable into a C# variable? Thanks.
-
I have a ASP.Net web application using C#, is there a way for me to get the PC screen resolution? I think I have to use javascript for this, but I don't know the syntax. If I have to use javascript, how do I get the value from the javascript variable into a C# variable? Thanks.
Use the Javascript screen[^] object to obtain the screen resolution. In your Javascript code, store the resolution info in hidden fields set to run server-side, then retrieve the info in your server-side code when you post the page back.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
Use the Javascript screen[^] object to obtain the screen resolution. In your Javascript code, store the resolution info in hidden fields set to run server-side, then retrieve the info in your server-side code when you post the page back.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
Can you point me to an example of storing the resolution in hidden fields set to run server-side?
-
I have a ASP.Net web application using C#, is there a way for me to get the PC screen resolution? I think I have to use javascript for this, but I don't know the syntax. If I have to use javascript, how do I get the value from the javascript variable into a C# variable? Thanks.
Hi try to accomodate your page at any resolution, this is the best way to persent your pages, if you have any complicated design, use screen.availHeight, screen.availWidth, best way to keep the resolution in the server side, in the login screen, send this height and width as comma separated values by hidden control. once you authenticated the page, you will keep some user information in the session, same time keep this height and width in your session, Note: if the user resize the screen, server side values can't updated. Regards Elayaraja.S