Solved

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

Posted on 2014-10-17
6
184 Views
Last Modified: 2014-10-17
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
0
Comment
Question by:rpm
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:louisfr
Comment Utility
Which type of control is butType1Search?
0
 
LVL 1

Author Comment

by:rpm
Comment Utility
<asp:Button ID="butType1Search" runat="server" Text="Search" />
0
 
LVL 11

Expert Comment

by:louisfr
Comment Utility
Is panEdCrit inside another panel? I remember seeing there was a problem with nested containers and default buttons.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:rpm
Comment Utility
The panel isn't inside anything else, but there is a multiview inside the panel, and the button is inside that.
0
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
Comment Utility
0
 
LVL 1

Author Comment

by:rpm
Comment Utility
Based on that article, I tried setting the DefaultButton for the root form, rather than the panel, and that worked.

Thanks for your help.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now