自定义验证器控件占用空间,即使显示设置为动态 [英] Custom validator control occupying space even though display set to dynamic

查看:83
本文介绍了自定义验证器控件占用空间,即使显示设置为动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么自定义验证器控件占用高度,即使设置为显示等于动态:

 < tr> 
< td style =min-height:0px;>
< asp:CustomValidator ID =cvFiscalFromyearrunat =serverStyle =width:160px; ErrorMessage =需要财政年度ForeColor =GreenDisplay =DynamicSetFocusOnError =trueClientValidationFunction =fncFromFiscalYear>必需< / asp:CustomValidator>
< / td>
< td style =min-height:0px;>
< asp:CustomValidator ID =cvFiscalToyearStyle =width:160px; runat =serverErrorMessage =需要财政年度ForeColor =GreenDisplay =动态ClientValidationFunction =fncToFiscalYear>必需< / asp:CustomValidator>
< / td>
< / tr>

它在表格标签内。 )

解决方案

Display =Dynamic很可能通过您显示为Customvalidator内容的必需设置功能。<​​/ p>

Why is the custom validator control occupying height even though it is set to display equals dynamic:

<tr>
    <td style="min-height: 0px;">
        <asp:CustomValidator ID="cvFiscalFromyear" runat="server" Style="width: 160px;" ErrorMessage="From fiscal year required" ForeColor="Green" Display="Dynamic" SetFocusOnError="true" ClientValidationFunction="fncFromFiscalYear">Required</asp:CustomValidator>
    </td>
    <td style="min-height: 0px;">
        <asp:CustomValidator ID="cvFiscalToyear" Style="width: 160px;" runat="server" ErrorMessage="To fiscal year required" ForeColor="Green" Display="Dynamic" ClientValidationFunction="fncToFiscalYear">Required</asp:CustomValidator>
    </td>
</tr>

It is inside table tag. Thanks in advance :)

解决方案

Display="Dynamic" is probably set out of function by the "Required" you're showing as content of the Customvalidator.

这篇关于自定义验证器控件占用空间,即使显示设置为动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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