我如何...是否可以在C#windows窗体(visual studio)上使用javascript运行HTML? [英] How do i...is it possible to run HTML with javascript on C# windows forms(visual studio)?
问题描述
事先我要感谢任何帮助。因为我对c#很陌生,所以下面的问题可能很愚蠢,所以请跟我一起玩。
所以我现在通过visual studio 2017上的c#windows窗口创建一个项目。我直到现在,整个项目的时刻都没问题。去年我创建了一个HTML / JavaScript WebPage(文件),我想知道当我点击c#上的按钮时,是否有任何方法可以通过执行命令来运行该文件。
我尝试了什么:
我曾尝试将其作为http链接,但显然只是HTML方面出现但没有功能。
任何帮助或方向都会非常有用。
In advance I would like to thank for any help given. As I'm quiet new to c#, the following question might be a silly one, so please bare with me.
So I'm currently creating a project via c# windows forms on visual studio 2017. I'm ok with the moment with the whole project until now. last year I created a HTML/JavaScript WebPage(file) and I was wondering if there is any way I could run that file by executing a command when I click on a button on c#.
What I have tried:
I have tried to do it as a http link but then obviously only the HTML aspect comes up but no functionality.
Any help or direction would be really helpful.
推荐答案
是的,您实际上可以在自己的应用程序中托管网页。我在这个Codeproject文章中做到了:
CodeProject Article Scraper,重访 [ ^ ]
向下滚动到标有Visual Presentation的部分。
Yes, you can actually host a web page in your own application. I did it in this Codeproject article:
CodeProject Article Scraper, Revisited[^]
Scroll down to the section labeled "Visual Presentation".
这篇关于我如何...是否可以在C#windows窗体(visual studio)上使用javascript运行HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!