C# ASP.NET MVC: Single-Line If Clause in View? -


I've got a slight issue ... and it can not be solved.

I see this:

  <% if (model! Display text) {%> & Lt;% = Model My Text% & gt; & Lt;%}% & gt;  

As you can see, I am using 3x & lt;% and%> He just screams like bad code but I can not seem to work in this same line, it throws all kinds of strange errors (like semicolon is missing, and when I add it, it's something Throws):

    

Any ideas ?!

Try:

  & lt;% = model Display Text? "": Model. My Text% & gt;  

or

  & lt;% if (Model! Display Text) Response Write (Model. MyText); & Gt%;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -