Yahoo Αναζήτηση Διαδυκτίου

Αποτελέσματα Αναζήτησης

  1. 26 Αυγ 2013 · If you're meaning to make a server call from the client, you should use Ajax - look at something like Jquery and use $.Ajax () or $.getJson () to call the server function, depending on what kind of return you're after or action you want to execute. answered Aug 26, 2013 at 9:49.

  2. 28 Νοε 2015 · You can call javascript functions from c# using Jering.Javascript.NodeJS, an open-source library by my organization: string javascriptModule = @". module.exports = (callback, x, y) => { // Module must export a function that takes a callback as its first parameter. var result = x + y; // Your javascript logic.

  3. The following sections of this article demonstrate various approaches for invoking an instance .NET method: Pass a DotNetObjectReference to an individual JavaScript function. Pass a DotNetObjectReference to a class with multiple JavaScript functions. Call .NET generic class methods. Class instance examples.

  4. The example demonstrates how to invoke a JS function from a C# method that offloads a requirement from developer code to an existing JS API. The JS function accepts a byte array from a C# method, decodes the array, and returns the text to the component for display.

  5. 1 Οκτ 2018 · Before passing a .NET object to a JavaScript function, your C# code must wrap it in a DotNetObjectRef object. As an example, the following code in my project's Index.cshtml OnInitAsync method instantiates a .NET Customer object and passes it into a DotNetObjectRef object's constructor (I used the OnInitAsync method because it executes ...

  6. To invoke a static .NET method from JavaScript (JS), use the JS functions: DotNet.invokeMethodAsync (recommended): Asynchronous for both server-side and client-side components. DotNet.invokeMethod: Synchronous for client-side components only.

  7. Example. class Car { public string model; public string color; public int year; // Create a class constructor with multiple parameters public Car(string modelName, string modelColor, int modelYear) { . model = modelName; . color = modelColor; .

  1. Γίνεται επίσης αναζήτηση για