Link to home
Start Free TrialLog in
Avatar of rpm
rpmFlag for United Kingdom of Great Britain and Northern Ireland

asked on

The DefaultButton of 'panEdCrit' must be the ID of a control of type IButtonControl ???

Hi,

I have an ASP.Net project that contains the following line:

panEdCrit.DefaultButton = butType1Search.UniqueID

On my development PC this works fine, and the default button within the panel panEdCrit is set to butType1Search

When I upload this to the web server I get the following error:

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

What's going on, and how do I fix this?

Thanks,

Richard
Avatar of louisfr
louisfr

Which type of control is butType1Search?
Avatar of rpm

ASKER

<asp:Button ID="butType1Search" runat="server" Text="Search" />
Is panEdCrit inside another panel? I remember seeing there was a problem with nested containers and default buttons.
Avatar of rpm

ASKER

The panel isn't inside anything else, but there is a multiview inside the panel, and the button is inside that.
ASKER CERTIFIED SOLUTION
Avatar of louisfr
louisfr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rpm

ASKER

Based on that article, I tried setting the DefaultButton for the root form, rather than the panel, and that worked.

Thanks for your help.