如何使用C#代码获取浏览器宽度? [英] How to Get the Browser Width using C# code?

查看:537
本文介绍了如何使用C#代码获取浏览器宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我使用javascript来识别浏览器的宽度,现在我需要通过使用C#代码找到浏览器的宽度,是否可以在浏览器被更改时获得浏览器的宽度值。 div class =h2_lin>解决方案

你在找这个吗?



http://stackoverflow.com/questions/14746564/asp-net-get-screen-width?rq=1 [ ^ ]


您无法从c#代码中获取浏览器宽度,但您可以使用当前的javascript来更新表单上隐藏字段的值,并且该值将随表单供您使用,或者找到一些其他适当的方法将数据传递到您的服务器代码,具体取决于您正在做什么。


Actually i'm using javascript to identify the width of the browser, now i need to find the width of the browser by using the C# code, Is it possible to get width value of the browser whenever the browser is altered.

解决方案

are you looking for this -

http://stackoverflow.com/questions/14746564/asp-net-get-screen-width?rq=1[^]


You can't get the browser width from your c# code, but you can use the javascript you currently have to update the value a hidden field on a form and that value will be submitted with the form for you to use, or find some other appropriate way of passing the data to your server code depending on what it is you're doing.


这篇关于如何使用C#代码获取浏览器宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆