In asp.net mvc, when do we use:
and
Do we ever need to put a ; (colon) ?
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.
<%= %>renders the output (string) of the contained command to the response.<% %>wraps executable statements (logic) in the view to control what gets executed. You don’t use semicolons in the<%= %>blocks, but may in the<% %>depending on what statements are included.String rendering:
<%= Html.Encode( Model. Property ) %>Code block:
<% Html.RenderPartial( 'ViewName' ); %>EDIT: Here’s a link to the reference.