Skip to content

Commit 6af996b

Browse files
committed
Update aspnetapp sample with latest WebForms template
1 parent f88ffd4 commit 6af996b

File tree

84 files changed

+57632
-11473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+57632
-11473
lines changed

samples/aspnetapp/aspnetapp.sln

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27428.2043
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35521.163 d17.12
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aspnetapp", "aspnetapp\aspnetapp.csproj", "{8C2399E7-5551-49FD-8C0C-CCAA2FA8C528}"
7-
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E8569ED5-912E-43BB-AD73-3B9DBB56EC52}"
9-
ProjectSection(SolutionItems) = preProject
10-
.dockerignore = .dockerignore
11-
deploy-container-to-aci.md = deploy-container-to-aci.md
12-
Dockerfile = Dockerfile
13-
Dockerfile.windowsservercore-ltsc2016 = Dockerfile.windowsservercore-ltsc2016
14-
README.md = README.md
15-
EndProjectSection
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aspnetapp", "aspnetapp\aspnetapp.csproj", "{0EBC2182-864F-47B6-B3D2-219EB6C92DEE}"
167
EndProject
178
Global
189
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1910
Debug|Any CPU = Debug|Any CPU
2011
Release|Any CPU = Release|Any CPU
2112
EndGlobalSection
2213
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23-
{8C2399E7-5551-49FD-8C0C-CCAA2FA8C528}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{8C2399E7-5551-49FD-8C0C-CCAA2FA8C528}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{8C2399E7-5551-49FD-8C0C-CCAA2FA8C528}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{8C2399E7-5551-49FD-8C0C-CCAA2FA8C528}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{0EBC2182-864F-47B6-B3D2-219EB6C92DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0EBC2182-864F-47B6-B3D2-219EB6C92DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{0EBC2182-864F-47B6-B3D2-219EB6C92DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{0EBC2182-864F-47B6-B3D2-219EB6C92DEE}.Release|Any CPU.Build.0 = Release|Any CPU
2718
EndGlobalSection
2819
GlobalSection(SolutionProperties) = preSolution
2920
HideSolutionNode = FALSE
3021
EndGlobalSection
31-
GlobalSection(ExtensibilityGlobals) = postSolution
32-
SolutionGuid = {594D2B7F-0B98-470D-978A-0214E48CF075}
33-
EndGlobalSection
3422
EndGlobal
Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,9 @@
1-
<%@ Import Namespace="System.Runtime.InteropServices" %>
2-
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="aspnetapp.About" %>
1+
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="aspnetapp.About" %>
32

43
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
5-
<h2><%: Title %>.</h2>
6-
<div align="center">
7-
<table class="table table-striped table-hover">
8-
<tr>
9-
<td>.NET version</td>
10-
<td><%= RuntimeInformation.FrameworkDescription %></td>
11-
</tr>
12-
<tr>
13-
<td>Operating system</td>
14-
<td><%= RuntimeInformation.OSDescription %></td>
15-
</tr>
16-
<tr>
17-
<td>Processor architecture</td>
18-
<td><%= RuntimeInformation.OSArchitecture %></td>
19-
</tr>
20-
<tr>
21-
<td>CPU cores</td>
22-
<td><%= Environment.ProcessorCount %></td>
23-
</tr>
24-
<tr>
25-
<td>DOTNET_RUNNING_IN_CONTAINER</td>
26-
<td><%= (Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER") is null ? "false" : "true") %></td>
27-
</tr>
28-
</table>
29-
</div>
4+
<main aria-labelledby="title">
5+
<h2 id="title"><%: Title %>.</h2>
6+
<h3>Your application description page.</h3>
7+
<p>Use this area to provide additional information.</p>
8+
</main>
309
</asp:Content>

samples/aspnetapp/aspnetapp/App_Start/BundleConfig.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class BundleConfig
1212
// For more information on Bundling, visit https://go.microsoft.com/fwlink/?LinkID=303951
1313
public static void RegisterBundles(BundleCollection bundles)
1414
{
15+
RegisterJQueryScriptManager();
16+
1517
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
1618
"~/Scripts/WebForms/WebForms.js",
1719
"~/Scripts/WebForms/WebUIValidation.js",
@@ -34,5 +36,17 @@ public static void RegisterBundles(BundleCollection bundles)
3436
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
3537
"~/Scripts/modernizr-*"));
3638
}
39+
40+
public static void RegisterJQueryScriptManager()
41+
{
42+
ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
43+
new ScriptResourceDefinition
44+
{
45+
Path = "~/scripts/jquery-3.7.0.min.js",
46+
DebugPath = "~/scripts/jquery-3.7.0.js",
47+
CdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.7.0.min.js",
48+
CdnDebugPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.7.0.js"
49+
});
50+
}
3751
}
3852
}

samples/aspnetapp/aspnetapp/ApplicationInsights.config

Lines changed: 0 additions & 140 deletions
This file was deleted.
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="aspnetapp.Contact" %>
22

33
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
4-
<h2><%: Title %>.</h2>
5-
<h3>Your contact page.</h3>
6-
<address>
7-
One Microsoft Way<br />
8-
Redmond, WA 98052-6399<br />
9-
<abbr title="Phone">P:</abbr>
10-
425.555.0100
11-
</address>
4+
<main aria-labelledby="title">
5+
<h2 id="title"><%: Title %>.</h2>
6+
<h3>Your contact page.</h3>
7+
<address>
8+
One Microsoft Way<br />
9+
Redmond, WA 98052-6399<br />
10+
<abbr title="Phone">P:</abbr>
11+
425.555.0100
12+
</address>
1213

13-
<address>
14-
<strong>Support:</strong> <a href="mailto:[email protected]">[email protected]</a><br />
15-
<strong>Marketing:</strong> <a href="mailto:[email protected]">[email protected]</a>
16-
</address>
14+
<address>
15+
<strong>Support:</strong> <a href="mailto:[email protected]">[email protected]</a><br />
16+
<strong>Marketing:</strong> <a href="mailto:[email protected]">[email protected]</a>
17+
</address>
18+
</main>
1719
</asp:Content>
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
/* Move down content because we have a fixed navbar that is 50px tall */
2-
body {
3-
padding-top: 50px;
4-
padding-bottom: 20px;
5-
}
6-
7-
/* Wrapping element */
1+
/* Wrapping element */
82
/* Set some basic padding to keep content from hitting the edges */
93
.body-content {
4+
margin-top: 15px;
105
padding-left: 15px;
116
padding-right: 15px;
127
}
@@ -18,20 +13,9 @@ textarea {
1813
max-width: 280px;
1914
}
2015

21-
2216
/* Responsive: Portrait tablets and up */
2317
@media screen and (min-width: 768px) {
24-
.jumbotron {
25-
margin-top: 20px;
26-
}
27-
2818
.body-content {
2919
padding: 0;
3020
}
3121
}
32-
33-
.navbar-inverse .navbar-toggle:hover,
34-
.navbar-inverse .navbar-toggle:focus {
35-
background-color: #777;
36-
border-color: #fff
37-
}

0 commit comments

Comments
 (0)