NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Code Render Blocks

Code render blocks define inline code or inline expressions that execute when the page is rendered. There are two styles:

Inline code (can be used to define either self-contained code blocks or control flow blocks):

<% inline code %>

Inline expression (short-cut for calling Response.Write):

<%= inline code %>

Remarks

A compilation error occurs if you attempt 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 fragment will cause an error:

<%@ page language="C#" %>
<%
Response.Write(" %>");
%>

To work around this error, you can build a String containing the offending sequence:

<%@ page language="C#" %>
<%
String s = "%" + ">";
Response.Write(s);
%>

Example

[To be supplied.]

See also

ASP+ Page Syntax