Hi I have created an ActiveX control in C#.net and using it in a html page.
HTML Code is :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<OBJECT id="DemoActiveX" classid="clsid:14CBF038-4D43-457e-A5D2-CBED641218C5" codebase="DemoCSharpActiveXNew.cab">
</OBJECT>
<script type="text/javascript">
var obj = document.DemoActiveX;
alert(obj.AddToIEList());
</script>
</body>
</html>
When I run this html page from file system (e:\testpage.html) it installs the dll packaged in "DemoCSharpActiveXNew.cab" and calls the
obj.AddToIEList();
method , but when I run it from Visual Studio it installs the dll (packaged in "DemoCSharpActiveXNew.cab") but throws a java script error saying that:
Object doesn't support property or method
Why is this happening ? Any idea ?
Update: Now I updated the .inf file as per link given by @wakqasahmed, it goes like this:
When I run the web page with in local host it installs the activex control but same error
Object doesn't support property or method
is coming even after activex has been installed.