开发者

asp panel default button not working

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"
 开发者_如何学Go                               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.


Try to remove the AutoPostBack="True" from your txtPriceTo text box, and see if that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜