N
NvrBst
Hello. I posted this problem in the
microsoft.public.dotnet.languages.csharp origionally but moving it
here since I think it probably belongs here now.
I have a blank ASP.NET/C# page with a code behind file. I made the
following function in the code behind file
public string GetFlower(){TEST.Flower myFlower = new TEST.Flower();
return myFlower.get_GetFlower(2);}
And in my form I do "<% Response.Write(GetFlower()); %>" But I get
null because varibles in the COMs "CFlower::OnPageStart(IUnknown*
piUnk) {...}" method isn't getting set. I have old ASP.NET/
JScript.NET pages that call the function like so "var myFlower =
Server.Create("TEST.Flower"); Response.Write(myFlower.GetFlower(2));"
and it works fine.
Does "new TEST.Flower();" not call "OnPageStart(...)" function
automatically like "Server.CreateObject("TEST.Flower");" does? The
TEST.dll is added to the ASP.NET/C# pages and intellisence sees all my
methods. Small Note: when I do "myFlower.GetFlower(2);" C# tells me
to use the direct accessor method "myFlower.get_GetFlower(2);". Could
this be why "OnPageStart(IUnknown* piUnk);" isn't being called?
I don't mind calling the "OnPageStart(IUnknown)" manually but I'm
unable to find what they want as the arg "IUnknown piUnk". My ASP.NET
Code behind file extends System.Web.Page so I think I should have the
"piUnk" they want someplace... I tried giving it a random number or
string but it just throws an exception.
Any help would be much apprisiated.
NB
microsoft.public.dotnet.languages.csharp origionally but moving it
here since I think it probably belongs here now.
I have a blank ASP.NET/C# page with a code behind file. I made the
following function in the code behind file
public string GetFlower(){TEST.Flower myFlower = new TEST.Flower();
return myFlower.get_GetFlower(2);}
And in my form I do "<% Response.Write(GetFlower()); %>" But I get
null because varibles in the COMs "CFlower::OnPageStart(IUnknown*
piUnk) {...}" method isn't getting set. I have old ASP.NET/
JScript.NET pages that call the function like so "var myFlower =
Server.Create("TEST.Flower"); Response.Write(myFlower.GetFlower(2));"
and it works fine.
Does "new TEST.Flower();" not call "OnPageStart(...)" function
automatically like "Server.CreateObject("TEST.Flower");" does? The
TEST.dll is added to the ASP.NET/C# pages and intellisence sees all my
methods. Small Note: when I do "myFlower.GetFlower(2);" C# tells me
to use the direct accessor method "myFlower.get_GetFlower(2);". Could
this be why "OnPageStart(IUnknown* piUnk);" isn't being called?
I don't mind calling the "OnPageStart(IUnknown)" manually but I'm
unable to find what they want as the arg "IUnknown piUnk". My ASP.NET
Code behind file extends System.Web.Page so I think I should have the
"piUnk" they want someplace... I tried giving it a random number or
string but it just throws an exception.
Any help would be much apprisiated.
NB