asp 面板默认按钮不起作用
我在我的项目中使用 ajax 可折叠面板扩展器。因此,在价格范围功能面板之一中,我有 2 个文本框和 1 个 ASP 按钮,用于处理价格范围功能。好吧,我试图将按钮设置为该 asp 面板内的默认按钮,但它不起作用。我在 Firefox、IE 和 Firefox 中尝试了我的页面。铬也。它只是不执行任何操作并重新加载页面。
下面我添加了asp代码,
<asp:Panel ID="PricePanel" runat="server" CssClass="ui-widget-header ui-corner-all"
Style="padding: 0.1em 0.3em; text-align: left;">
<asp:Image ID="imgPrice" runat="server" />
<asp:Label ID="AllPrices" runat="server" Text="Price Range"></asp:Label>
</asp:Panel>
<asp:Panel ID="PricePanelContent" runat="server" CssClass="collapsePanel" DefaultButton="btnPrice">
<div class="PriceRange">
<asp:Label ID="lblPriceFrom" runat="server" Text="Rs" Width="20px"></asp:Label><asp:TextBox
Width="60px" ID="txtPriceFrom" runat="server"></asp:TextBox>
<asp:Label ID="lblPriceTo" runat="server" Text="To Rs " Width="42px"></asp:Label><asp:TextBox
ID="txtPriceTo" Width="60px" runat="server" AutoPostBack="True" Wrap="True"></asp:TextBox>
<asp:Button ID="btnPrice" runat="server" Text="Go" OnClick="btnPrice_Click" />
</div>
</asp:Panel>
<asp:CollapsiblePanelExtender TargetControlID="PricePanelContent" ImageControlID="imgPrice"
ExpandedImage="~/images/open.png" CollapsedImage="~/images/close.png" ID="CollapsiblePrice"
ExpandControlID="PricePanel" CollapseControlID="PricePanel" CollapsedText="All Price"
TextLabelID="AllPrices" ExpandedText="" Collapsed="true" runat="server" SuppressPostBack="true">
</asp:CollapsiblePanelExtender>
如果有人可以帮助我。
谢谢&问候,
梅胡尔·马克瓦纳。
I am using ajax colllapsible panel extender in my project. So in one of the Price Range function panel i have 2 text boxes and one asp button that will handle the function of price range. Well i'm trying to set button as default button inside that asp panel but it does not work. I tried my page in firefox, IE & chrome also. It just performs no action and reloads the page.
Below i am adding the asp code,
<asp:Panel ID="PricePanel" runat="server" CssClass="ui-widget-header ui-corner-all"
Style="padding: 0.1em 0.3em; text-align: left;">
<asp:Image ID="imgPrice" runat="server" />
<asp:Label ID="AllPrices" runat="server" Text="Price Range"></asp:Label>
</asp:Panel>
<asp:Panel ID="PricePanelContent" runat="server" CssClass="collapsePanel" DefaultButton="btnPrice">
<div class="PriceRange">
<asp:Label ID="lblPriceFrom" runat="server" Text="Rs" Width="20px"></asp:Label><asp:TextBox
Width="60px" ID="txtPriceFrom" runat="server"></asp:TextBox>
<asp:Label ID="lblPriceTo" runat="server" Text="To Rs " Width="42px"></asp:Label><asp:TextBox
ID="txtPriceTo" Width="60px" runat="server" AutoPostBack="True" Wrap="True"></asp:TextBox>
<asp:Button ID="btnPrice" runat="server" Text="Go" OnClick="btnPrice_Click" />
</div>
</asp:Panel>
<asp:CollapsiblePanelExtender TargetControlID="PricePanelContent" ImageControlID="imgPrice"
ExpandedImage="~/images/open.png" CollapsedImage="~/images/close.png" ID="CollapsiblePrice"
ExpandControlID="PricePanel" CollapseControlID="PricePanel" CollapsedText="All Price"
TextLabelID="AllPrices" ExpandedText="" Collapsed="true" runat="server" SuppressPostBack="true">
</asp:CollapsiblePanelExtender>
If any one can help me on this.
Thanks & Regards,
Mehul Makwana.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试从
txtPriceTo
文本框中删除AutoPostBack="True"
,看看是否有帮助。Try to remove the
AutoPostBack="True"
from yourtxtPriceTo
text box, and see if that helps.