What is the ASP.Net equivalent to PHP's Echo?

后端 未结 3 784
有刺的猬
有刺的猬 2020-12-03 17:22

I want to \'echo\' a string separated by delimeters like: sergio|tapia|1999|10am

the Body of an HTML page.

How can I achieve this? Thank you!

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 17:24

    In the new Razor syntax, you can just write @variable in your html and its value will be echoed:

    @{
        var name = 'Hiccup';
    }
    
    

    Welcome @name

提交回复
热议问题