Microsoft KB Archive/828985

= You may receive an &quot; &quot; error message when you move a user control to a form =

Article ID: 828985

Article Last Modified on 4/19/2007

-

APPLIES TO


 * MSDN 2003 Universal Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Academic Edition
 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.0

-





SUMMARY
When you move a user control from the toolbox to a form in Microsoft Visual Studio .NET, you may receive the following design-time Microsoft Development Environment error message:



After you click OK to dismiss this error message, you may notice that Visual Studio .NET does not load the user control correctly. You may also notice a design-time error message on the user control. This error message begins with the following text:

System.ArgumentException: 

You may receive these design-time error messages if you use the following help topics. These help topics are incorrect in the Visual Studio .NET 2003 documentation and in the Visual Studio .NET documentation:
 * IDesignerOptionService Interface
 * IDesignerOptionService.GetOptionValue Method
 * IDesignerOptionService.SetOptionValue Method

However, you do not receive these design-time errors if you use the sample code that is provided for the &quot;IDesignerOptionService Interface&quot; help topic in the Visual Studio .NET 2003 documentation.



MORE INFORMATION
The behavior that is mentioned in the &quot;Summary&quot; section occurs because the GetOptionValue method and the SetOptionValue method that you call in your user control do not succeed. This behavior occurs when you pass a pageName parameter that contains white space characters to these methods.

In Visual Studio .NET 2003 documentation, the &quot;Remarks&quot; section of the &quot;IDesignerOptionService Interface&quot; help topic contains the following incorrect sentence:

Therefore, you can usually access the designer options page with the English page name &quot;Windows Forms Designer\General&quot;.

The correct sentence follows:

Therefore, you can usually access the designer options page with the English page name &quot;WindowsFormsDesigner\General&quot;.

In Visual Studio .NET 2003 documentation, the &quot;Remarks&quot; section of the &quot;IDesignerOptionService.GetOptionValue Method&quot; help topic and the &quot;Remarks&quot; section of the &quot;IDesignerOptionService.SetOptionValue Method&quot; help topic both contain the following incorrect sentence:

For example, to access a value on the page Windows Forms Designer >> General, specify &quot;Windows Forms Designer\General&quot; as the page name.

The correct sentence follows:

For example, to access a value on the page Windows Forms Designer >> General, specify &quot;WindowsFormsDesigner\General&quot; as the page name.

In Visual Studio .NET documentation, the &quot;Remarks&quot; section of the &quot;IDesignerOptionService Interface&quot; help topic contains the following incorrect sentence:

Therefore, you can usually access the designer options page with the English page name &quot;.NET Framework Designer\General&quot;.

The correct sentence follows:

Therefore, you can usually access the designer options page with the English page name &quot;WindowsFormsDesigner\General&quot;.

In Visual Studio .NET documentation, the &quot;Remarks&quot; section of the &quot;IDesignerOptionService.GetOptionValue Method&quot; help topic and the &quot;Remarks&quot; section of the &quot;IDesignerOptionService.SetOptionValue Method&quot; help topic both contain the following incorrect sentence:

For example, to access a value on the page .NET Framework Designer >> General, specify &quot;.NET Framework Designer\General&quot; as the page name.

The correct sentence follows:

For example, to access a value on the page Windows Forms Designer >> General, specify &quot;WindowsFormsDesigner\General&quot; as the page name.

