asp.net ajax 日历扩展器(在 updatepanel 中)导致换行
这是我的页面的简化版本:
<asp:UpdatePanel runat="server" ID="dateUpdatePanel" RenderMode="Inline">
<ContentTemplate>
<asp:Label runat="server" ID="lblDateFrom" Text="From:" />
<asp:TextBox runat="server" ID="txtDateFrom" />
<asp:ImageButton runat="server" ID="cmdDateFrom" ImageUrl="~/images/calendar.jpeg" />
<ajax:CalendarExtender runat="server" ID="calendarFrom" TargetControlID="txtDateFrom"
PopupButtonID="cmdDateFrom" Format="dd/MM/yyyy" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button runat="server" ID="cmdRunReport" Text="Run Report" OnClick="cmdRunReport_Click" />
UpdatePanel 设置为内联呈现,因此“运行报告”按钮显示在日历输入右侧的行中。 但是,当我单击日历图像按钮 (cmdDateFrom) 时,“运行报告”按钮会移动并呈现在下一行!
有 CSS 大师可以帮忙吗?
Here's a simplified version of my page:
<asp:UpdatePanel runat="server" ID="dateUpdatePanel" RenderMode="Inline">
<ContentTemplate>
<asp:Label runat="server" ID="lblDateFrom" Text="From:" />
<asp:TextBox runat="server" ID="txtDateFrom" />
<asp:ImageButton runat="server" ID="cmdDateFrom" ImageUrl="~/images/calendar.jpeg" />
<ajax:CalendarExtender runat="server" ID="calendarFrom" TargetControlID="txtDateFrom"
PopupButtonID="cmdDateFrom" Format="dd/MM/yyyy" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button runat="server" ID="cmdRunReport" Text="Run Report" OnClick="cmdRunReport_Click" />
The UpdatePanel is set to render inline so the "Run Report" button is displayed in line and to the right of the calendar input. However, when I click on the calendar image button (cmdDateFrom) the "Run Report" button moves and is rendered on the next line down!
Can any CSS gurus help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是因为日历呈现为 div,默认情况下它有自己的行。 一种选择是在绝对位置 div 中使用标准日历控件。 这将阻止它强制换行,但您必须正确排列页面,使其不覆盖任何必要的控件。
Probably because the calendar is rendered as a div, which by default gets its own line. An option would be to use a standard calendar control within an absolutely position div. That would prevent it from forcing the wrapping, but you'll have to arrange the page properly so it doesn't cover any necessary controls.
似乎可以用 IE6 和 FF3 修复它
seems to fix it with IE6 and FF3