Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to access c# dll from javascript?

how to access c# dll from javascript?

Scheduled Pinned Locked Moved ASP.NET
csharpjavascripttutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iamdking
    wrote on last edited by
    #1

    Hello friends, I want to access C# dll functions from javascript. Can any one tell me steps to do it? Thanks

    Amit

    A E A 3 Replies Last reply
    0
    • I iamdking

      Hello friends, I want to access C# dll functions from javascript. Can any one tell me steps to do it? Thanks

      Amit

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      You can do it using ActiveX Components. But this will work only on IE.

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      1 Reply Last reply
      0
      • I iamdking

        Hello friends, I want to access C# dll functions from javascript. Can any one tell me steps to do it? Thanks

        Amit

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        If you use Ajax you can make calls to a web host if the C# dll accepts post request, you can translate your requests through an ASP.NET page, or if you use Silverlight you can interact with silverlight from Javascript. Each choice has pro's and con's. If you really want seamless interaction, use Java and Live Connect.

        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

        1 Reply Last reply
        0
        • I iamdking

          Hello friends, I want to access C# dll functions from javascript. Can any one tell me steps to do it? Thanks

          Amit

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Create one HttpHandler, in that reference the dll and do all you need in ProcessRequest. From javascript, call the handler to fetch the response. If you want to use Javascript to access WebMethod, you can also do that using PageMethod, for which you need to expose the methods as Web Service. Take a look into this : http://forums.asp.net/p/1266663/2382644.aspx[^] :)

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Simplify Code Using NDepend
          Basics of Bing Search API using .NET
          Microsoft Bing MAP using Javascript

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups