Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2006, 12:58 AM
Registered User
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling a method defined inside a .NET dll

I have created a Class Library and within the class library I have a Windows Form. I compiled this class library and got the dll. This dll is now embedded on a HTML page using:

<object id="ndcObj" classid="http://nh-rajen/ntest/NDCDemo.dll#NDCDemo.NDCDraw" height="356" width="367">
</object>

Now I need to call a method within this dll from javascript within the page, lets say I do it onClick of a button on the page as:

function ChangeText()
  {
     ndcObj.setText('Test Text');
  }

This however does not work and I get the error that the object has no such defined properties or methods. How do I expose my method such that I can call it from outside of the dll. The current method definition for setText is:

public static void setText(string txtValue)

{

   this.textBox1.Text = txtValue;

}



Please help me out..

Thanks in advance,

Cheers,
Rajen









Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net do not use all the cpu calling to C++ DLL wakeup .NET Framework 2.0 5 January 23rd, 2008 05:29 AM
Calling a method defined inside a .NET dll rajen C# 5 January 7th, 2008 04:04 AM
Calling a dll inside from a dll tiredcat Visual Basic 2005 Basics 2 August 30th, 2007 11:02 PM
Using .NET DLL from inside VB6 application Dmitriy General .NET 1 January 30th, 2006 04:45 PM
Calling a .Dll of Vb.NET enggalok C++ Programming 0 March 1st, 2004 06:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.