Here I displayed the code.Suggest me,If anything wrong.
namespace MyActivex
{
public interface AxMyControl
{
String UserText { set; get; }
}
public partial class MyControl : UserControl,AxMyControl
{
string mystring;
public MyControl()
{
this.InitializeComponent();
this.Show();
//InitializeComponent();
}
public string UserText
{
get { return mystring; }
set
{
mystring = value;
textBox1.Text = value;
}
}
}
}
After building this code,created the dll and registered it successfully.And my html page is,
<html>
<body>
<form name="frm" id="frm">
<input type="text" name="txt" value="enter text here">
<input type="button" value="Click me" onClick="doScript();">
</form>
<object id="MyControl" name="MyControl" classid="MyActivex.dll#MyActivex.MyControl"
width=300 height=80>
</object>
</body>
<script language="javascript">
function doScript()
{
MyControl.UserText=frm.txt.value;
}
</script>
</html>
I have placed my html page in the same folder where the dll exists.While opening the html page it displays as follows.Help me to find what is going wrong.If this is a simple and stupid issue, forgive me.I searched a lot for the solution but i didn't find.So that only posting here.