Step I: Have a user control
Build up a simple user control that has a label , calendar and progress bar :
Copy the binaries or configure the solution project of the user control to output the binaries to the virtual directory of the IIS diretory e.g. C:\inetpub\wwwroot .
Step III : Create web page and create instance of the user control
create HTML
page with the following code and name it Host.html then save it in the virtual directory :
create HTML
<html>
<head><title>Host My User Control</title><head>
<body>
<div id ="container">
<object id="MyUserControl" classid="http://localhost/MySmallControl.dll#MySmallControl.MyUserControl"</object>
</div>
</body>
</html>
where as;
MySmallControl.dll stands for the binary namewhere as;
MySmallControl stands for the namespace of the project
MyUserControl stands for the class name of the user control
Step IV : Surf to the Host.html
open Internet Explorer and surf to http://localhost/Host.html and you good to go !
The user control hosted in Internet Expolrer !
Related Topics i'm gonig to release soon:
How to interact between Javascriptcode and host user control C# code
How to give access to the host user control to the client's resources ,e.g. the Hard Disk
No comments:
Post a Comment