Link to home
Start Free TrialLog in
Avatar of JR
JR

asked on

How to include the JavaScript file in dll in C# and use

Experts,

How to include the JavaScript file in dll in C# and use

Thanks,
Jothi
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why do you want to do this - as Dave rightly points out it makes no sense.
To get "good answer" you need to describe what are you going to do.

e.g. you can host IE browser and execute any JavaScript with:

HtmlElement head = webBrowser1.Document.GetElementsByTagName("head")[0];
HtmlElement scriptEl = webBrowser1.Document.CreateElement("script");
IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement;
element.text = "function sayHello() { alert('hello') }";
head.AppendChild(scriptEl);
webBrowser1.Document.InvokeScript("sayHello");



ore for example use:

http://javascriptdotnet.codeplex.com/
Avatar of JR
JR

ASKER

closed