Subject: using com obj in asp.net
Posted By: Asteroid Post Date: 9/23/2004 3:00:37 AM
hi,
 i have to use the funtionality of a com object. some methods of the com object.
For This in Visual studio.net I did the following.
 project->add refrences->com->  click Mylib.lib  
One thing more The MyLib.dll is present in the winnt/system32/  and it is registered with the windows.
Then I have included the following code in my ASP.NET web form

MyLib obj;
obj = new MyLib();

But i am getting these errors
c:\inetpub\wwwroot\smstest\WebForm1.aspx.cs(56): 'MyLib' denotes a 'namespace' where a 'class' was expected

c:\inetpub\wwwroot\smstest\WebForm1.aspx.cs(57): The name 'obj' does not exist in the class or namespace 'smstest.WebForm1'
 Any help ??  What I have to do more?

Reply By: planoie Reply Date: 9/26/2004 9:49:20 PM
your MyLib library contains classes.  You have to instantiate a class.  You can't instantiate a library.  So you need something like this:

MyLib.MyLibClass obj = new MyLib.MyLibClass;
Reply By: Asteroid Reply Date: 9/27/2004 8:48:06 AM
thx planoie


Go to topic 19774

Return to index page 762
Return to index page 761
Return to index page 760
Return to index page 759
Return to index page 758
Return to index page 757
Return to index page 756
Return to index page 755
Return to index page 754
Return to index page 753