将C#值传递给HTML [英] Passing C# values to HTML
本文介绍了将C#值传递给HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have a Python Programming background and am trying to create a simple web page in C# with visual studio. In Python Flask Framework we can pass back end code to front end like this:
index.html(文件)
index.html (file)
< h1> HTML句子{{python variable}}的开头HTML句子</h1>
<h1> Beginning of HTML sentence {{python variable}} end of HTML sentence </h1>
我该如何使用C#?
推荐答案
您可以使用Razor语法完成此操作,请从
You can do it with Razor Syntax please check it from
https://docs.microsoft.com/zh-cn/aspnet/web-pages/overview/getting-started/introducing-razor-syntax-c
https://docs.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/introducing-razor-syntax-c
这篇关于将C#值传递给HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文