You may receive an "<unknown>" error message when you move a user control to a form (828985)



The information in this article applies to:

  • Microsoft Developer Network (MSDN)
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • 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:
<Unknown>
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: <Unknown>
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 "IDesignerOptionService Interface" help topic in the Visual Studio .NET 2003 documentation.

MORE INFORMATION

The behavior that is mentioned in the "Summary" 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 "Remarks" section of the "IDesignerOptionService Interface" help topic contains the following incorrect sentence:

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


The correct sentence follows:

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


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

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


The correct sentence follows:

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


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

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


The correct sentence follows:

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


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

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


The correct sentence follows:

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

REFERENCES

For additional information about the updated "IDesignerOptionService Interface" help topic, visit the following Microsoft Developer Network (MSDN) Web site:For additional information about the updated "IDesignerOptionService.GetOptionValue Method" help topic, visit the following MSDN Web site:For additional information about the updated "IDesignerOptionService.SetOptionValue Method" help topic, visit the following MSDN Web site:

Modification Type:MinorLast Reviewed:8/24/2005
Keywords:kbvs2002sp1sweep kbide kbCtrlCreate kbControl KbUIDesign kbDesigner kbProgramming kbCompModel kberrmsg kbdocerr kbBug KB828985 kbAudDeveloper