ASP.NET Master page DefaultButton override

前端 未结 3 1779
心在旅途
心在旅途 2021-02-07 05:18

I have a master page with a form element and the defaultbutton attribute set to a server-side ImageButton. On one of my pages I want to \"override\" the masterpage defaultbutto

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 05:40

    You could try using the "DefaultButton" property of a Panel...

    Place your button or whole page or div in asp:Panel

    // start panel

    asp:Panel ID="pnlOpsCallSummay" runat="server" DefaultButton="btnSearch"

    ............

    //Controls of your requirement

    ..........

    asp:Button ID="btnSearch" runat="server" Text="Search"

    close the pannel

    No need of Overriding the master page button

提交回复
热议问题