mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-18 19:36:28 +00:00
Move WebForms notes to single file
This commit is contained in:
parent
6971933509
commit
8fc0fc905c
2 changed files with 31 additions and 30 deletions
|
@ -1,4 +1,6 @@
|
||||||
# Page.aspx
|
# WebForms
|
||||||
|
|
||||||
|
## `Page.aspx`
|
||||||
|
|
||||||
The fist loaded page is `Default.aspx` and its undelying code.
|
The fist loaded page is `Default.aspx` and its undelying code.
|
||||||
|
|
||||||
|
@ -22,8 +24,6 @@ The fist loaded page is `Default.aspx` and its undelying code.
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
## ASP.NET Directives
|
|
||||||
|
|
||||||
### Page Directive
|
### Page Directive
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
|
@ -33,7 +33,7 @@ The fist loaded page is `Default.aspx` and its undelying code.
|
||||||
Inherits="EmptyWebForm.Default" %>
|
Inherits="EmptyWebForm.Default" %>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Web Controls
|
### Web Controls
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<asp:Control ID="" runat="server" ...></asp:Control>
|
<asp:Control ID="" runat="server" ...></asp:Control>
|
||||||
|
@ -56,3 +56,30 @@ The fist loaded page is `Default.aspx` and its undelying code.
|
||||||
<!-- SqlSataSource; connection string specified in Web.config -->
|
<!-- SqlSataSource; connection string specified in Web.config -->
|
||||||
<asp:SqlDataSource ID="sds_" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SQL Query"></asp:SqlDataSource>
|
<asp:SqlDataSource ID="sds_" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SQL Query"></asp:SqlDataSource>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `Page.aspx.cs`
|
||||||
|
|
||||||
|
```cs
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace Project
|
||||||
|
{
|
||||||
|
public partial class Default : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Control_Event(object sender, EventAtgs e)
|
||||||
|
{
|
||||||
|
// actions on event trigger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
|
@ -1,26 +0,0 @@
|
||||||
# Page.aspx.cs
|
|
||||||
|
|
||||||
```cs
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
|
|
||||||
namespace Project
|
|
||||||
{
|
|
||||||
public partial class Default : System.Web.UI.Page
|
|
||||||
{
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Control_Event(object sender, EventAtgs e)
|
|
||||||
{
|
|
||||||
// actions on event trigger
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
Loading…
Add table
Reference in a new issue