Solved

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

Posted on 2014-10-17
6
197 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

815 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

8 Experts available now in Live!

Get 1:1 Help Now