简体   繁体   English

ASP.NET与在C#中创建/打开.HTML文件

[英]ASP.NET vs creating/opening .HTML file in C#

I am currently attempting to import D3 (data driven documents) visualizations into Spotfire. 我目前正在尝试将D3(数据驱动的文档)可视化文件导入Spotfire。 My approach is to embed a web page into Spotfire, run the HTML and Javascript there, and then reference variables regarding the data tables, filtering and such from the SDK (C#). 我的方法是将网页嵌入Spotfire,在其中运行HTML和Javascript,然后从SDK(C#)中引用有关数据表,过滤等的变量。

I was wondering which approach would be better: making an ASP.NET project (which I have little experience with), or just creating an HTML file from inside a standard C# project, making a filestream, writing all the Javascript and HTML into the HTML file and then opening it. 我想知道哪种方法更好:创建一个ASP.NET项目(我经验很少),或者仅从标准C#项目内部创建HTML文件,创建文件流,将所有Javascript和HTML写入HTML文件,然后将其打开。

However, when someone changes the filtering properties in Spotfire, I would need to reflect that by updating the Javascript to pass in different variables into D3. 但是,当有人在Spotfire中更改过滤属性时,我需要通过更新Javascript将不同的变量传递到D3中来反映出来。 I'm not sure if this makes one of the approaches impossible or not. 我不确定这是否会使其中一种方法无法实现。

Can someone point me in the right direction? 有人可以指出我正确的方向吗?

Thanks, Arthur 谢谢,亚瑟

Based on the information provided in the question, it appears you are comfortable working in Javascript. 根据问题中提供的信息,您似乎很喜欢使用Javascript。 Why not give node.js + Express.js a shot? 为什么不试一试node.js + Express.js? If the code needs to be run locally you could pair it with appJS as well. 如果代码需要在本地运行,则也可以将其与appJS配对。

ASP.Net MVC也可以为您工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM