File: prism-aspnet.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (36 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<h2>Comments</h2>
<pre><code>&lt;%-- This is a comment --%>
&lt;%-- This is a
multi-line comment --%></code></pre>

<h2>Page directives</h2>
<pre><code>&lt;%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"  CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
</code></pre>

<h2>Directive tag</h2>
<pre><code>&lt;%: Page.Title %>
&lt;a href="ProductDetails.aspx?productID=&lt;%#:Item.ProductID%>">
&lt;span>
	&lt;%#:Item.ProductName%>
&lt;/span></code></pre>

<h2>Highlighted C# inside scripts</h2>
<p>This requires the C# component to be loaded.
	On this page, check C# <strong>before</strong> checking ASP.NET should make
	the example below work properly.</p>
<pre><code>&lt;script runat="server">
	// The following variables are visible to all procedures
	// within the script block.
	String str;
	int i;
	int i2;

	int DoubleIt(int inpt)
	{
		// The following variable is visible only within
		// the DoubleIt procedure.
		int factor = 2;

		return inpt * factor;
	}
&lt;/script></code></pre>