show line numbers in conde snippets

This commit is contained in:
Marcello 2023-10-20 18:22:46 +02:00
parent cd1df0e376
commit 255a68d673
82 changed files with 1249 additions and 1251 deletions

View file

@ -4,7 +4,7 @@
The fist loaded page is `Default.aspx` and its underlying code.
```html
```html linenums="1"
<!-- directive -->
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Project.Default" %>
@ -26,7 +26,7 @@ The fist loaded page is `Default.aspx` and its underlying code.
### Page Directive
```cs
```cs linenums="1"
<%@ Page Language="C#" // define language used (can be C# or VB)
AutoEventWireup="true" // automatically create and setup event handlers
CodeBehind="Default.aspx.cs" // define the underlying code file
@ -35,7 +35,7 @@ The fist loaded page is `Default.aspx` and its underlying code.
### Web Controls
```xml
```xml linenums="1"
<asp:Control ID="" runat="server" ...></asp:Control>
<!-- Label: empty text will diplay ID, use empty space as text for empty label -->
@ -59,7 +59,7 @@ The fist loaded page is `Default.aspx` and its underlying code.
## `Page.aspx.cs`
```cs
```cs linenums="1"
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)