在Asp.Net Razor中使用 else if
@{var price=25;} <html> <body> if (price>=30) { <p>The price is high.</p> } else if (price>20 && price<30) { <p>The price is OK.</p> } else { <p>The price is low.</p> } </body> </html>
在Asp.Net Razor中使用 else if
@{var price=25;} <html> <body> if (price>=30) { <p>The price is high.</p> } else if (price>20 && price<30) { <p>The price is OK.</p> } else { <p>The price is low.</p> } </body> </html>