UpdatePanel放错了按钮

时间:2011-02-24 17:47:12

标签: c# asp.net

我正在使用下面的代码在表的标签内使用更新面板。但是,由于更新面板,“日志故事”按钮显示在剩余的两个按钮之上:重置和取消。这可能是一个简单的修复,所以如何将所有按钮对齐?谢谢!

 <td colspan="2" align="right">
            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
            <asp:Button CssClass="button_style" id="btnSubmit" class="btn" Text="Log Story" runat="server" onClientClick="javascript:return validate();" Width="80px" />
            </ContentTemplate>
            </asp:UpdatePanel>
            <div style="display: none;">
                <asp:Button CssClass="button_style" id="Submit" class="btn" runat="server" OnClick="btnSubmit_Click" />
            </div>
                &nbsp;
            <asp:Button CssClass="button_style" id="btnReset" class="btn" Text="Reset" onClick="clear" runat="server" Width="70px" />
                &nbsp;
            <asp:Button CssClass="button_style" id="btnCancel" class="btn" Text="Cancel" onClick="cancel" runat="server" Width="70px" />
 </td> 

1 个答案:

答案 0 :(得分:0)

这个怎么样?

<td colspan="2" align="right">
            <table>
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
            <asp:Button CssClass="button_style" id="btnSubmit" class="btn" Text="Log Story" runat="server" onClientClick="javascript:return validate();" Width="80px" />
            </ContentTemplate>
            </asp:UpdatePanel>
</td>
</tr>

</table>
            <div style="display: none;">
                <asp:Button CssClass="button_style" id="Submit" class="btn" runat="server" OnClick="btnSubmit_Click" />
            </div>
                &nbsp;
            <asp:Button CssClass="button_style" id="btnReset" class="btn" Text="Reset" onClick="clear" runat="server" Width="70px" />
                &nbsp;
            <asp:Button CssClass="button_style" id="btnCancel" class="btn" Text="Cancel" onClick="cancel" runat="server" Width="70px" />
 </td>