【问题标题】:asp:changePassword cellpaddingasp:changePassword 单元格填充
【发布时间】:2013-01-23 12:55:42
【问题描述】:

所以我使用了 asp:changePassword,它显示了允许用户显示密码的表单; 然后我将面板在屏幕上居中。但是我想在行之间添加间距/单元格填充: 到目前为止我有:

<div style="position:relative;left:300px;top:100px;padding:10px;">
       <asp:ChangePassword ID="ChangePassword2" CancelDestinationPageUrl="~/Default.aspx" ContinueDestinationPageUrl="~/Default.aspx" runat="server">

       </asp:ChangePassword>
    </div>

我试过了: TextBoxStyle-CssClass & BorderPadding 并尝试将 div 定位在 changePassword 内并使用 'class' 将其居中。

我看到有一个然后创建表和行等...

有没有更简单的方法来做到这一点?我要做的就是通过'cellpadding = 5px'将changePassword面板中的每一行分开

请指教谢谢

编辑:

<div style="position:relative;left:300px;top:100px;padding:10px;">      
            <asp:GridView ID="GV" runat="server" CellPadding="0" CellSpacing="0">
               <asp:ChangePassword ID="ChangePassword2" BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" 
                BorderWidth="1px" CancelDestinationPageUrl="~/Default.aspx" ContinueDestinationPageUrl="~/Default.aspx" runat="server">             
                </asp:ChangePassword>
           </asp:GridView>       
    </div>

【问题讨论】:

    标签: asp.net css change-password


    【解决方案1】:

    我认为您需要使用 GridView 控件。然后在标记中,确保将 cellpadding 和 cellspacing 设置为零,然后应用以下 CSS...

    table { border-collapse: collapse; }
    table tr, table td, table th { border: solid 5px #000; margin: 0; padding: 0; }
    

    【讨论】:

    • @Rachel_Gallen 谢谢,但它不允许我将 asp:changePassword 放在 asp:gridview 中,反之亦然..,我已添加代码作为我原始消息的编辑
    • 所以你还是接受了我关于 gridview 的建议?这应该值得一票吗?... :)
    • 嘿 Rach...(请参阅我之前的评论)它不允许我将 changePassword 放在 gridView 中,所以需要更改它...好主意吗?
    • 哦,我以为你已经解决了 - 你的 gridview editable = true 了吗?
    猜你喜欢
    • 2015-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-31
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 2017-08-30
    相关资源
    最近更新 更多