Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all of you, i have search alot for this but nothing yet get a great work...please give me link or define elaborately that how can i write and use ActiveX for asp.net in c#...
i m doing a project for online finger print verification. and that need a ActiveX on client side which is difficult for me please solve my problem .

EDIT (Copied from OP's comment)
-----------------------------
i have done working in winform control library but how could i upload that winform on website all is fine but its not giving me winform control on web its giving me blank space... i have done the security level to low and also enable the active x in internet option i also use the trusted site but yet not getting the right result... solve it please.

regards,
ashraf paracha
Posted
Updated 28-May-11 20:09pm
v2
Comments
irsam 29-May-11 1:04am    
i have done working in winform control library but how could i upload that winform on website all is fine but its not giving me winform control on web its giving me blank space... i have done the security level to low and also enable the active x in internet option i also use the trusted site but yet not getting the right result...
solve it plz.
Wonde Tadesse 29-May-11 13:13pm    
Can you show the code how you do it?
irsam 31-May-11 12:55pm    
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace WindowsControlLibrary
{
[ComVisible(true)]
public partial class UserControl1 : UserControl
{

public UserControl1()
{
InitializeComponent();
}
public void SendMessage(string msg)
{
_lblMessage.Text = msg;
}
}
}

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Windows Form Control Test Page</title>
<script type="text/javascript">
function SendMessageToWinControl() {
var winCtrl = document.getElementById("MyWinControl");
winCtrl.SendMessage("Message sent from the HTML page!!");
}
</script>

</head>
<body>

Windows Form Control:


<object id="MyWinControl"
classid="bin/WindowsControlLibrary.dll#WindowsControlLibrary.UserControl1" width=800 height=300>
<param name="Text" value="Simple Control">
</object>
<br/>
<input type="button" önclick="SendMessageToWinControl()" value="Send Message" />

</body>

</html>

1 solution

 
Share this answer
 
Comments
irsam 29-May-11 2:54am    
buddy i have done it bt it also give me same blank page..
Wonde Tadesse 29-May-11 13:14pm    
5+. Because he didn't provide any code how he did it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900