locked
Include JavaScript code in Windows C# app

    Question

  • Can we include a JavaScript file window 8 C# app. If yes, then how to call the JavaScript code from C#
    Thursday, March 06, 2014 9:17 AM

Answers

  • use webview and ScriptNotify if you are working for Win8.0 app, (8.1 got small change on API). Read this for more information: http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, March 06, 2014 12:47 PM
    Moderator

All replies

  • C# app is created using Project > Visual c# > Windows Store > Windows Runtime Component.

    Thursday, March 06, 2014 9:24 AM
  • in c# you want to call a javascript function? no thats possible.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, March 06, 2014 10:14 AM
  • Yes I want to call a javascript function from c# app windows 8.
    Thursday, March 06, 2014 10:47 AM
  • Is it possible?
    Thursday, March 06, 2014 11:22 AM
  • no it not ... cant you convert it to c# code?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Thursday, March 06, 2014 11:28 AM
  • I don't want to convert the JS code to c#. The same JS code is used in Javascript app and browsers. Want to reuse it in C# app.
    Thursday, March 06, 2014 11:57 AM
  • use webview and ScriptNotify if you are working for Win8.0 app, (8.1 got small change on API). Read this for more information: http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, March 06, 2014 12:47 PM
    Moderator
  • Thanks Jamles.

    This is exactly what I require.

    Friday, March 07, 2014 1:07 PM