๐Ÿ”ฅ Articles, eBooks, Jobs, Columnist, Forum, Podcasts, Courses ๐ŸŽ“



Forum -> -> Answers


Back

Category:

concatenation of c# razor string with HTML string


how can I concatenate c# razor with HTML string?

Date: Thursday, November 23, 2023
2 answers | 861 view(s)
by erick patrick almeida de sá

Answers

You can do this.

@if (value) { @("R$ "+ course.CoursePrice) } else { @("$ " + course.CoursePrice) }

Thursday, November 23, 2023

Mauricio Junior


The secret is

@("string" + c# code);

Thursday, November 23, 2023

Mauricio Junior


NordVPN


Top