如何在ASP.NET端获取屏幕宽度

using System.Windows.Forms;

首先引用上面的命名空间。

然后在代码中获取屏幕信息。如下代码:

   System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.PrimaryScreen; System.Drawing.Rectangle rct = screen.Bounds;
            int width= screen.WorkingArea.Width;
原文地址:https://www.cnblogs.com/lss111520/p/3376385.html