Asp.Net Get Screen Width

后端 未结 4 1578
囚心锁ツ
囚心锁ツ 2021-01-03 11:00

How can I get the screen width on the server side in an Asp.net (C#) project?

4条回答
  •  花落未央
    2021-01-03 11:33

    Use code below

    int width = (Request.Browser.ScreenPixelsWidth) * 2 - 100;
    int height = (Request.Browser.ScreenPixelsHeight) * 2 - 100;
    

提交回复
热议问题