0

Whys is not lblMasterPhoneNumbers onclick method trigger when i press enter in the textbox?

       <asp:Panel ID="pnlSearch" DefaultButton="lbMasterPhoneNumber" runat="server">  
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td>
                <asp:TextBox ID="txtSearchMaster" runat="server" CssClass="TextBoxSearchActive" EnableTheming="false" />    
            </td>
            <td>
                <%--<asp:Button ID="btnSearchMaster" CssClass="SearchButton" runat="server" OnClick="btnSearchMaster_Click" CausesValidation="false" EnableTheming="False" />--%>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div style="margin-right:3px; color:white">                       
                    <asp:LinkButton ID="lbMasterPhoneNumber" runat="server" Text="Phone number" ForeColor="White" onclick="lbMasterPhoneNumber_Click" OnClientClick="javascript:ActivateLoadingIndicator()" /> &nbsp; | &nbsp;
                    <asp:LinkButton ID="lbMasterCDR" runat="server" Text="CDR" ForeColor="White" onclick="lbMasterCDR_Click" /> | &nbsp;
                    <asp:LinkButton ID="lbMasterSMS" runat="server" Text="SMS" ForeColor="White" onclick="lbMasterSMS_Click" />

                </div>
            </td>
        </tr>
    </table>
     </asp:Panel>
2
  • 1
    do you mean javascript:ActivateLoadingIndicator() is not triggered? Commented Feb 16, 2012 at 10:49
  • Which browser ?Should work in IE. Problems have been reported in Firefox over the years. refer stackoverflow.com/questions/938957/… Commented Feb 16, 2012 at 10:51

1 Answer 1

1

msdn states that defaultbutton property does not support linkbutton http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.panel.defaultbutton.aspx

Sign up to request clarification or add additional context in comments.

1 Comment

The work around is by using javascript. if you have not seen already refer these posts.kpumuk.info/asp-net/… henry-chong.com/2011/10/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.