PRB: Can not get UserControl/HTML/OBJECT to work on XP/SP2/IIS/IE6
Please help,
I can not get my UserControl to work from a simple OBJECT tag in a simple
HTML web page on Windows XP with SP2 and IIS. I have made UserControls
before, but for whatever reason, XP/SP2/IIS/something is not letting the web
page run the UserControl, giving an error of "Object doesn't support this
property or method". Here are the steps to reproduce:
Step 1) In XP/IIS create a virtual directory (VD) that runs ONLY scripts (NO
EXECUTABLES).
Step 2) Make this simple HTML page and put it in the VD from above.
=============== ======
<html>
<body>
<object
id=objTest
classid="http:M yControl.dll#My Namespace.MyCon trol"
VIEWASTEXT
</object>
</body>
<script language=javasc ript>
var objTest;
objTest = document.getEle mentById("objTe st");
var csHello = objTest.RunTest ("Hello");
alert(csHello);
</script>
</html>
=============== ======
Note that the OBJECT tag's classid is set with "http:" in the front. Trying
it without this will still generate the same error.
Step 3) Create a C# UserControl app called MyControl, with the namespace
"MyNamespac e", and add a method called "RunTest" to take a string as its only
parameter, and return the same string.
=============== =============== =======
Something about IE, XP, IIS is preventing the script from getting the
"RunTest" method. What can I do.