By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,481 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,481 IT Pros & Developers. It's quick & easy.

Use DLL with Javascript

P: n/a
Hi,

I just want to read out a property in a DLL which was written in c#
(with a Windows Control Library). But I can't get it work. Does anybody
know how it works?

c#

namespace getData
{
public partial class UserControl1 : UserControl
{

private string _name= "Frank";

public UserControl1()
{
InitializeComponent();

}

public string Name
{
get
{
return _name;
}
set
{
_name= value;

}
}

}
}

HTML + javascript:

<OBJECT id = "cr" classid =
getData.dll#getKKData.UserControl1"></OBJECT>

<script type="text/javascript">

name = cr.Name;
alert(Name);

</script>

Thanks,
Frank

Sep 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Frank Hermann wrote:
>
I just want to read out a property in a DLL which was written in c#
(with a Windows Control Library). But I can't get it work. Does anybody
know how it works?
Obviously, on anything other than MS Windows with .NET installed, it
simply doesn't.
Sep 12 '06 #2

P: n/a

Frank Hermann wrote:
I just want to read out a property in a DLL which was written in c#
[...]
<OBJECT id = "cr" classid =
getData.dll#getKKData.UserControl1"></OBJECT>

<script type="text/javascript">
name = cr.Name;
alert(Name);
</script>
If that's really your code (you cut & paste it and didn't just try to
type it in)... then Name != name. Javascript is case sensitive. Try
alert(name) or alert(cr.Name) instead.

Kev

Sep 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.