Click here to Skip to main content
Click here to Skip to main content

Using C# controls in IE

, 13 Jun 2006
Rate this:
Please Sign up or sign in to vote.
An article on how to use C# controls in Internet Explorer

Sample Image - zrabai_article_1.jpg


This article describes how you can use programmable C# controls in Internet Explorer without using IIS or other server program, but COM technology.

You have to place an object (identified by a classid) into the html code:

        <object classid="clsid:32F9346E-D34A-47f3-8017-B62E7EEA6CB1">

Use the same guid in the C# code of a Windows Control Library, and the following attributes before your own UserControl class. 
   namespace UserControlInHtml
       public partial class UserControl1 : UserControl

Design your controls as usual. Before build process do not forget about two check boxes:
In Assembly Information dialog check the check box for "Make assembly COM-Visible" (Properties / Application tag).
On Properties / Build tag check the check box for "Register for COM interop".

After building open your html file from IE. Using Demo project you have to register before starting IE, see the attached readme.txt file.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Comments and Discussions

GeneralMy vote of 1 Pinmemberwilliamnw23-Feb-09 2:28 
QuestionRun Time Add Controls On Browser PinmemberSarita Rajput24-Jul-08 0:12 
AnswerRe: Run Time Add Controls On Browser PinmemberZoltan2324-Jul-08 4:52 
QuestionDo you know how to do it with C++ ? PinmemberMarcello13-Jun-06 4:23 
AnswerRe: Do you know how to do it with C++ ? PinmemberZoltan2313-Jun-06 20:25 
QuestionSecurity Context PinmemberThomas Lykke Petersen29-May-06 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140718.1 | Last Updated 13 Jun 2006
Article Copyright 2006 by Zoltan23
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid