Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Seth Ford   on Jul 09 In Asp.net Category.

  
Question Answered By: Brandon Tucker   on Jul 09

Your code behind executes at the server - so there is no screen.

So you'll have to do it client side and post it to the server, something like


<body>
<input type=hidden id=screenstuff>
<script>
screenstuff.value = screen.width + "_" + screen.height + "_" +
screen.colorDepth + "_" + document.body.clientWidth + "_"+
document.body.clientHeight;
<script>

These functions can change depending on browser ( I think, but don't quote me)

Then split around "_" at server

str = Request.Form["screenstuff"]
string[] s = str.Split('_');
for (int i =0; i<s.Length;i++)
{
Response.Write(s[i] + "<br>");
}

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Screen Or get search suggestion and latest updates.


Tagged: