Hi, I want to use if condition in .ascx file. As shown below:
<%= if (value.equals("xyz")) {} %>
as shown above, if i use like that. then i am getting error of “invalid expression if“.
please guide me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instead of
<%=you should use<%(without the=sign):<%=is used when you want to output the result of the expression directly to the HTML.