Microsoft KB Archive/315160

= BUG: The &quot;Classid&quot; Attribute of the Windows User Control in an  Tag Is Case Sensitive =

Article ID: 315160

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.0
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer (Programming) 6.0

-



This article was previously published under Q315160



SYMPTOMS
With Internet Explorer 5.5 or later, Web-based applications can download and run assemblies in a Web page.

For example, the following code references myClass:  However, if you load a user control with the code, an empty box may be displayed instead of the user control.



CAUSE
This problem occurs because the name of user control in the classid attribute of the tag is case sensitive.



RESOLUTION
To resolve this problem, use the correct case for the name of the user control in the classid attribute of the tag.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Problem
 Create a custom Windows Forms control. Start Visual Studio .NET. On the File menu, click New, and then click Project. In the Visual Basic project type, click Windows Control Library.  Add a button to the designer and add the following command in the Clicked event: MessageBox.Show(&quot;Clicked&quot;) </li> Add a new HTML page to the project that is named htmlpage1.htm.</li>  Add the following tag to the body of the HTML page: <object id=&quot;WindowsControlLibrary1&quot; classid=&quot;http://localhost/WindowsControlLibrary1.dll#WindowsControlLibrary1.usercontrol1&quot;> NOTE: usercontrol1 is in lowercase, which is the cause of the problem. </li> Build the project.</li> Copy the WindowsUserControl1.dll file and the HTML page to your \Inetpub\Wwwroot folder.</li> Direct your browser to the http://localhost/htmlpage1.htm address. The user control is not displayed.</li> In the HTML page, change the classid attribute to reflect the appropriate name of the user control (which is UserControl1) and navigate to the Web page; the control is displayed as expected.</li></ol>

Additional query words: kbreadme

Keywords: kbctrl kbbug kbpending KB315160

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.