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. General Programming
  3. C#
  4. Convert Javascript to C# Code

Convert Javascript to C# Code

Scheduled Pinned Locked Moved C#
csharpjavascripttutorialquestion
3 Posts 3 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.
  • K Offline
    K Offline
    kornstyle
    wrote on last edited by
    #1

    I found some Javascript code on the Internet and it works very well for what I need to use it for. I want to do the same thing in c# code. Does anyone know of a program that converts javascript to c# code? If not does anyone know how to run javascript from a c# program?

    R J 2 Replies Last reply
    0
    • K kornstyle

      I found some Javascript code on the Internet and it works very well for what I need to use it for. I want to do the same thing in c# code. Does anyone know of a program that converts javascript to c# code? If not does anyone know how to run javascript from a c# program?

      R Offline
      R Offline
      Richard Parsons
      wrote on last edited by
      #2

      Look into these methods for running javascript from within your asp.net app. RegisterClientScriptBlock() RegisterStartupScript() -Richard

      1 Reply Last reply
      0
      • K kornstyle

        I found some Javascript code on the Internet and it works very well for what I need to use it for. I want to do the same thing in c# code. Does anyone know of a program that converts javascript to c# code? If not does anyone know how to run javascript from a c# program?

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        One thing you can do is compile the JavaScript code as JScript.NET (look at jsc.exe compiler in the DotNet SDK). Once compiled as .NET code, C# code could call the JScript.NET functions without hassle.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: He has a funny face. And he's my son. Judah Himango

        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