How can I get the screen width on the server side in an Asp.net (C#) project?
Place this on your form:
This is onload script:
$(document).ready(function () {
$("#clientScreenWidth").val($(window).width());
$("#clientScreenHeight").val($(window).height());
});
This is server side code:
string height = HttpContext.Current.Request.Params["clientScreenHeight"];
string width = HttpContext.Current.Request.Params["clientScreenWidth"];