Get Page Resolution
Importusing System.Windows.Forms;
Namespace In your PageType The Query In your page ....
int height = Screen.PrimaryScreen.Bounds.Height; int width = Screen.PrimaryScreen.Bounds.Width;
Set Resolution In Your Page In CodeBehind
Type the below query
In Aspx page
<body id="body" runat="server">
</body>
In Aspx.cs page
int screenWidth= Screen.PrimaryScreen.Bounds.Width;
body.Style.Add("width", Convert.ToString(screenWidth));
No comments:
Post a Comment