Back
Theme:

concatenation of c# razor string with HTML string


how can I concatenate c# razor with HTML string?

Date: Thursday, November 23, 2023
2 answers | 122 view(s)
by Mauricio Junior

Finanças na prática

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