Debian Codegraph @

examples/prism-aspnet.html

raw symbols SCIP
1 <h2>Comments</h2>
2 <pre><code>&lt;%-- This is a comment --%>
3 &lt;%-- This is a
4 multi-line comment --%></code></pre>
5
6 <h2>Page directives</h2>
7 <pre><code>&lt;%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
8 </code></pre>
9
10 <h2>Directive tag</h2>
11 <pre><code>&lt;%: Page.Title %>
12 &lt;a href="ProductDetails.aspx?productID=&lt;%#:Item.ProductID%>">
13 &lt;span>
14 &lt;%#:Item.ProductName%>
15 &lt;/span></code></pre>
16
17 <h2>Highlighted C# inside scripts</h2>
18 <p>This requires the C# component to be loaded.
19 On this page, check C# <strong>before</strong> checking ASP.NET should make
20 the example below work properly.</p>
21 <pre><code>&lt;script runat="server">
22 // The following variables are visible to all procedures
23 // within the script block.
24 String str;
25 int i;
26 int i2;
27
28 int DoubleIt(int inpt)
29 {
30 // The following variable is visible only within
31 // the DoubleIt procedure.
32 int factor = 2;
33
34 return inpt * factor;
35 }
36 &lt;/script></code></pre>