T
todd
Hi all. I inherited this code from a contractor. It is a .NET user
control that runs on the client side (ie) on machines with the
framework installed. I have been mucking around to get it work for a
couple of days now, and am growign really frustrated. I need to
expose an Import method on the ImportControl and have it accesible to
javascrip in the browser.
If I remove the InterfaceType and ClassInterface attributes, compile
and then view the typelib created by tlbexp, it does not show any
methods on the class. If I add the attributes, the methods are
listed... ...but when I invoke throuhg the web nothing works. The err
is: "Object doesn't support method or porperty"
....PLEASE HELP ME... Thank you -- code posted below
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IImportControl
{
string Import(string workingDirPath, string fileName, string
fileType) ;
}
[ClassInterface(ClassInterfaceType.None)]
public class ImportControl : System.Windows.Forms.Control,
IImportControl
{
private System.ComponentModel.Container components = null;
public ImportControl()
{
InitializeComponent();
}
public string Import(string workingDirPath, string fileName, string
fileType)
{
return "" ;
}
}
CLIENT SIDE
<OBJECT id="ExportObject"
data="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRSBIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0JPRFk+PC9IVE1MPg0K"
classid="clah.dll#clah.ImportControl" VIEWASTEXT>
</OBJECT>
parent.document.getElementById("ImportObject");
ImportObject.Import("","","")
control that runs on the client side (ie) on machines with the
framework installed. I have been mucking around to get it work for a
couple of days now, and am growign really frustrated. I need to
expose an Import method on the ImportControl and have it accesible to
javascrip in the browser.
If I remove the InterfaceType and ClassInterface attributes, compile
and then view the typelib created by tlbexp, it does not show any
methods on the class. If I add the attributes, the methods are
listed... ...but when I invoke throuhg the web nothing works. The err
is: "Object doesn't support method or porperty"
....PLEASE HELP ME... Thank you -- code posted below
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IImportControl
{
string Import(string workingDirPath, string fileName, string
fileType) ;
}
[ClassInterface(ClassInterfaceType.None)]
public class ImportControl : System.Windows.Forms.Control,
IImportControl
{
private System.ComponentModel.Container components = null;
public ImportControl()
{
InitializeComponent();
}
public string Import(string workingDirPath, string fileName, string
fileType)
{
return "" ;
}
}
CLIENT SIDE
<OBJECT id="ExportObject"
data="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRSBIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0JPRFk+PC9IVE1MPg0K"
classid="clah.dll#clah.ImportControl" VIEWASTEXT>
</OBJECT>
parent.document.getElementById("ImportObject");
ImportObject.Import("","","")