Create Platform Independent Apps

Use Bridge.NET to build platform independent applications for mobile, web and desktop.
Run on iOS, Windows, Mac, Linux and billions of other devices with JavaScript support.

Supports popular JavaScript frameworks like JQuery, Bootstrap and more coming soon!

Write C#.
Run JavaScript.
C#Write Your Code In Visual Studio Using C#
// Full JavaScript API
Document.GetElementById("demo")
    .InnerHTML = "Hello";
 
 
// Call Alert()
Window.Alert("Bridge.NET");
 
 
// C# Classes
var person = new Demo.App.Person();
 
 
// Set C# Property
person.Name = "Frank";
 
 
// Generic Lists
var people = new List<Person>();
people.Add(person);
 
 
// Write to the Console
Console.WriteLine(people[0].Name); // Frank 
JSBridge.NET Transforms Into JavaScript
// Converted to correct JavaScript syntax
document.getElementById("demo")
    .innerHTML = "Hello";
 
 
// Call alert()
window.alert("Bridge.NET");
 
 
// JavaScript Classes
var person = new Demo.App.Person();
 
 
// Converted to handy 'set' and 'get' functions
person.setName("Frank");
 
 
// Equivalent List in pure JavaScript
var people = new Bridge.List(Demo.App.Person)();
people.add(person);
 
 
// Properly converted to console.log
console.log(people.get(0).getName()); // Frank 
C#Full jQuery API With Intellisense
// C# Method chaining
jQuery.Select("div")
    .FadeIn(500)
    .AddClass("highlight")
    .Text("Welcome");
 
 
// Event Handlers with Lambda Expressions
jQuery.Select("#myBtn").Click(() => {
    Console.Log("Button Clicked");
});
 
 
// jQuery Ajax requests
jQuery.Ajax("/person/55", new AjaxOptions {
    // Handle Success Event
    Success = (object obj, string str, jqXHR request) => {
        // Deserialize JSON Object
        var person = JSON.Parse((string)obj);

        // Set Input Field Value
        jQuery.Select("#txtName").Val(person.Name);
    }
}); 
JSAdvanced C# In JavaScript
// Converted to proper function chaining
$("div")
    .fadeIn(500)
    .addClass("highlight")
    .text("Welcome");
 
 
// Event handler with proper function syntax
$("#myBtn").click(function () {
    console.log("Button Clicked");
});
 
 
// Converted to optimized jQuery syntax
$.ajax("/person/55", {
    // Handle Success Event
    success: function (obj, str, request) {
        // Deserialize JSON Object
        var person = JSON.parse(Bridge.cast(obj, String));

        // Set Input Field Value
        $("#txtName").val(person.getName());
    }
}); 
C#C# Sample 3
// C# 3 
JSJavaScript Sample 3
// JavaScript 3 
Try Bridge.NET in your browser now! No installation required!Try Live

Deploy Your Apps Anywhere!

Your app is not limited to a single platform with Bridge.NET.
Compile your C# code into native JavaScript and deploy on Billions of devices.

deploy-anywhere

Bridge.NET Gives You Great Features

rocket

C# All The Way

Leverage the power of C# and Visual Studio to build apps using the skills you know
platform-independent

Platform Independent Deployment

Build apps for iOS, Android, Windows, Mac, Linux and billions of other devices
open-source

Open Source

Bridge.NET is Open-source and Free!
Download now and start building

Supports Popular Frameworks

With official and community built libraries for popular frameworks, developing powerful JavaScript apps is easier than ever.

More framework support is currently in development!

3D Graphics With WebGL

Just incredible what is possible to get pictured right into the browser with WebGL. It might be even a 3D game!

Use Bridge’s WebGL C# API and all the Bridge’s power to make great 3D stuff.

Please use A, S, D, W keys to spin the cube and Q/E to zoom out/in.

HTML5

Build web applications using cutting-edge HTML5 technology with the aid of Intellisense, statement completion, static typing, and all the advantages a compiled language environment can provide to increase productivity.

[Ready]
public static void Main()
{
    var msg = "Welcome to Bridge.NET";

    var div = new DivElement
    {
        InnerHTML = msg,
        ClassName = "alert alert-info"
    };

    Document.Body.AppendChild(div);

    Window.Alert("Success!");
} 

Add jQuery To Your App

Full support for jQuery allows unleashing dynamic applications coupled with the power of code reusability in a strongly typed programming environment, guaranteeing smooth running applications.
[Ready]
public static void Main()
{
    var body = Document.Body;

    new jQuery("<div>")
        .Attr("id", "div1")
        .Html("Hello World!")
        .AppendTo(body);

    new jQuery("<button>")
        .Html("Hide")
        .On("click", () => {
            jQuery.Select("#div1").FadeOut();
        })
        .AppendTo(body);
} 

Bootstrap

Websites can benefit from the advanced styling options and flexible components brought by Bootstrap. Written on a friendly and robust environment to allow beautiful and responsive applications.
[Ready]
public static void Main()
{
    var button = new ButtonElement {
        Type = ButtonType.Button
    };

    button.ClassList.Add("btn");
    button.ClassList.Add("btn-sm");
    button.ClassList.Add("btn-info");
    button.InnerHTML = "Bootstrap";
} 

Test Your Code with QUnit

It is always good to be 100% sure about your code. And it is always great to have the tools just ready at hand to do that.

Writing unit tests for your projects with Bridge.QUnit Framework is very easy.

Write C# using the QUnit API and run JavaScript unit tests. Bridge.NET is tested by the Bridge.QUnit and tests are available online at QUnit API

[Ready]
public static void RunTests()
{
   QUnit.Module("PersonService");

   QUnit.Test("Method GetPerson()", (assert) =>
   {
       var service = Test.GetService();
       var person = service.GetPerson(55);

       assert.Expect(3);

       assert.Ok(person != null, "Person created");
       assert.DeepEqual(Id, 55, "Id = 55");
       assert.DeepEqual(Name, "Frank", "Name = 'Frank'");
   });
}