如何在后面的代码中访问文本框的宽度和高度 [英] how to access width and height of textbox in code behind

查看:90
本文介绍了如何在后面的代码中访问文本框的宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI ........
我想在后面的代码中访问通过文本框的css类应用的宽度和高度.如果我通过在文本框标签本身中写入文本来将宽度和高度应用于文本框,我会得到宽度和高度,但是如果我尝试通过应用宽度来与宽度和高度相同和高度通过CSS类,我无法访问宽度和高度.为此提供解决方案.

HI........
I want to access width and height which is apply through css class of textbox in code behind.If i am apply width and height to textbox by writting it in text box tag itself i got width and height but if i try same with by applying width and height through css class i am not able to access the width and height.provide soln for it.

推荐答案

我要访问的宽度和高度为通过代码后面的文本框的CSS类应用
您知道页面的呈现方式吗?

请求页面后,该页面将在服务器端构建并发送回给您.服务器代码完成后,将对控件应用样式.
您无法通过控件访问/获取服务器代码中的CSS类宽度/属性.尽管您可以根据需要在服务器端设置控件的样式属性.
I want to access width and height which is apply through css class of textbox in code behind
You know how the page is rendered?

Once you request for a page, the page is constructed at the server side and sent back to you. Styles to controls are applied after the server code is done.
You cannot access/get the css class width/properties in your server code through controls. Though you can set the style properties of a control from your server side if needed.


这篇关于如何在后面的代码中访问文本框的宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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