ASP.NET文本框的大小不同时的TextMode =密码 [英] ASP.NET Textbox size differs when TextMode=Password

查看:238
本文介绍了ASP.NET文本框的大小不同时的TextMode =密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有了在页面上几个文本框一个登录页面,其中一个有设置为密码的模式。本页面的工作previously但我们最近发现(因为一个IE7更新)的被指定作为密码文本框的文本不一样宽的页面上的文本框等。如果我删除的TextMode =密码文本框中调整大小相匹配的其他人。

I have a login page that has several textboxes on the page, one of them has the mode set to "password". This page worked previously but we've recently noticed (since an IE7 update) that the textbox that is specified as a password textbox is not as wide as the other textboxes on the page. If I remove the TextMode="Password", the textbox resizes to match the others.

我已经检查页面上的怪事时,页面会显示使用IE开发工具栏,但是这一切看起来正常。

I've checked for oddities on the page when the page displays using the IE developer toolbar, but it all looks ok.

文本框code是相当基本的:

The textbox code is fairly basic:

    <tr>
  <td>
	Username
  </td>
  <td>
	<asp:TextBox ID="txtUsername" runat="server" TabIndex="2"></asp:TextBox>
  </td>
</tr>
<tr>
  <td>
	Password
  </td>
  <td>
	<asp:TextBox ID="txtPassword" TextMode="Password" runat="server" TabIndex="3"></asp:TextBox>
  </td>
</tr>

我发现另外一个人问到这个网络上,他们通过应用CSS页面上的所有输入控件固定的,但我没有设法得到这工作的。

I've found one other person asking about this on the web and they fixed it by applying a css to all the input controls on the page, but I haven't managed to get that to work either.

推荐答案

最好的,以确保所有控件都将是同样大小的方法是通过样式(内联或CSS)。

The best way to ensure that all of your controls will be of the same size is via style (either inline or in css).

这篇关于ASP.NET文本框的大小不同时的TextMode =密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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