Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2014-10-17
6
204 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
ID: 40386626
Which type of control is butType1Search?
0
 
LVL 1

Author Comment

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

Expert Comment

by:louisfr
ID: 40386645
Is panEdCrit inside another panel? I remember seeing there was a problem with nested containers and default buttons.
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 1

Author Comment

by:rpm
ID: 40386651
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
ID: 40386661
0
 
LVL 1

Author Comment

by:rpm
ID: 40386677
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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