开发者

Can you set the default button of a panel with a button that is not in that panel but in another content placeholder in a master page?

开发者 https://www.devze.com 2023-02-14 04:28 出处:网络
Can you set the default button of a panel with a button that is not in that panel but in another content placeholder within a master page? I have tried this but I get the following error:

Can you set the default button of a panel with a button that is not in that panel but in another content placeholder within a master page? I have tried this but I get the following error:

The DefaultButton of 'pnlTmp' must be the ID of a control of type IButtonControl.

开发者_开发技巧

I have also tried setting the panels DefaultButton this way :

  pnlTmp.DefaultButton = btnContinue.UniqueID

This gave me the same error.

Any help would be great.


Try for this issue Master page properties:

    Page.Master.Page.Form.DefaultButton = btnButton.UniqueID

    ' if first doesn't help
    Page.Master.Page.Form.DefaultFocus = btnButton.ClientID
0

精彩评论

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