| |||||||||||||||||||
Code Render BlocksASP.NET Syntax ASP.NET Page Syntax Defines inline code or inline expressions that execute when the page is rendered. There are two styles: inline code and inline expressions. Use inline code to define self-contained code blocks or control flow blocks. <% inline code %> Use inline expressions as a shortcut for calling the HttpResponse.Write method. <%=inline expression %> RemarksA compilation error occurs if you try to include the character sequence %> anywhere inside a code render block. That sequence can only be used to close the code render block. For example, the following code fragment will cause an error:
To work around this error, you can build a string containing the sequence of characters.
Syntax ExampleThe below code snippet shows how you can use the render blocks to display the same HTML text in a number of different font sizes.
See Also |
| ||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme