none
Is it possible to use dll s or csharp code in javascript for sidebar gadgets?

    Question

  • hi,

    i am trying to develop a simple sidebar gadget and this is my first project about gadgets.
    i dont know javascript well and i have to code some complex things (complex for me :) ) and i am trying to find a way escaping javascript.
    does anyone know about how can i do this.

    thanx in advance.
    Tuesday, February 17, 2009 8:22 AM

All replies


  • i have the same problem.

    it would be great, if there is a way to use external local libraries .

    thanks.





    Tuesday, February 17, 2009 8:15 PM
  • Since Sidebar gadgets use Javascript, there's really no good way to get around it.  You could write your gadget in Flash or Silverlight and then embed that with some simple html + javascript, but that's a pretty poor solution and has its own set of issues.  You could use something like Script# to write in C# and "compile" to javascript instead (Script# even has a gadget project type), but ultimately that's going to generate javascript that you'll have to debug, so you may as well take the time to learn javascript properly to do what you want.
    Wednesday, February 18, 2009 5:27 AM
  • It is possible to use other code inside the HTML page to write gadgets. Here is a quote from Microsoft TechNet,

    "Creating an HTML File

    As we’ve already noted, a gadget is just an HTML file. That means that any elements (including dynamic elements) you can use in an HTML page can also be used in a gadget. As you’ve probably already figured out, this includes VBScript code; although most of the early gadgets made available through the Microsoft Gadgets Web site use JScript or JavaScript, VBScript works just fine (as you’ll soon see).

    ...
    <script language="VBScript"> "

    http://www.microsoft.com/technet/scriptcenter/topics/vista/gadgets-pt1.mspx

    But I wouldn't think you cannot use code that has to be compiled. Hope this helps.

    Tuesday, April 14, 2009 8:14 PM