When it comes to programming, the less than (<) and greater than (>) seems to have about the same number of meanings as the word ‘break’. I’m not sure if that is true but I do know there are many meanings. I have compiled a list of meanings and when you might use each one.
<% %> |
Used for performing in-line code routines |
Example: |
<%=inline expression %> |
<%$ %> |
Used for Evaluating expressions in .Net |
Example: |
<$ AppSettings: Copyright %> |
<%:%> |
New in ASP.net 4.0. Used for short hand notation for HTML encoded elements |
Example: |
<%: Model.Content%> |
<@ %> |
Used at the top of Page for page directives |
Example: |
<%@ Page Title=””%> |
<%= %> |
Embedded code blocks |
Example: |
<% =GetTime() %> |
< …… > |
Used to handle HTML blocks or ASP.NET Controls |
Example: |
<a href=”>sample'</a> |
<%# %> |
Used for binding data to a control |
Example: |
<%# DataBinder.Eval(Container.DataItem, “Name”)%> |
<%– –%> |
Used for writing server-side comments |
Example: |
<%– Server Side Comment –%> |
<!– –> |
Used for actual comments inside html form |
Example: |
<!– Comment –> |
You can see there are many ways to use these symbols. I hope this helps in your programming.
Note: If you can think of any others uses pass them along and I will add them.
Looking for quality web hosting? Look no further than Arvixe Web Hosting!