you can find in this tutorial
http://www.java-samples.com/showtutorial.php?tutorialid=1015[
^]
if you want to get this in codebehind
if you want to use this clearly please dont forget add script jquery and ScriptManagerin page
in your html line put this in body
<input type="hidden" id="inptWidth" runat="server" />
<input type="hidden" id="inptHeight" runat="server" />
your script
<script type="text/javascript">
$(document).ready(function() {
var inptWidth = $get('<%=inptWidth.ClientID %>');
var inptHeight = $get('<%=inptHeight.ClientID %>');
inptWidth.value = window.innerWidth;
inptHeight.value = window.innerHeight;
});
</script>
and this my anybuttons click event
protected void btnControl_Click(object sender, EventArgs e)
{
string val = inptWidth.Value;
}
dont forget you cant do this in load of page. because clientside loading occuring after server-side loading.