Tuesday, March 11, 2008

How to Create Signed Windows Controls

The step by step way to create windows controls and use it in an ASP.NET page
1:create a new project Windows Control Libray
2:build and execute
3:create the key pair using SDK command promptsn -k ssokeypair.snksn -p ssokeypair.snk ssopublic.snk
4:import keypair to your project
5:right click on the project->properites->signing->check sign the assembly->choose our keepair
6:Set ComVisible property to "true" in assemblyInfo.cs file.
7:go to SDK command prompt register the controlregasm [path of control] /codebase
8:use the registered control in your asp.net project or any other project
9:get classid of the object from registry editor
10: format of object tag : object id="MyControl.UserControl1" classid="clsid:125A8E3F-FE89-3133-B956-DD041D7BED9E"