Request Screen width and height in .NET code
But at server-side, it's a little tricky.
We have created a file, we call it detect_screen.aspx
Request this file using a returnUrl parameter, like:
After collecting these parameters, it is being put into the session and a redirect will happen, back to index.aspx (this example)
Take a look at detect_screen.aspx.txt