Skip to content

Commit 509fd2f

Browse files
Fonte do artigo Criando CRUD com Asp.Net Web Forms 4.5
0 parents  commit 509fd2f

File tree

157 files changed

+33993
-0
lines changed

Some content is hidden

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

157 files changed

+33993
-0
lines changed

.gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

.gitignore

+215
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
44+
# Build results
45+
46+
[Dd]ebug/
47+
[Rr]elease/
48+
x64/
49+
build/
50+
[Bb]in/
51+
[Oo]bj/
52+
53+
# MSTest test Results
54+
[Tt]est[Rr]esult*/
55+
[Bb]uild[Ll]og.*
56+
57+
*_i.c
58+
*_p.c
59+
*.ilk
60+
*.meta
61+
*.obj
62+
*.pch
63+
*.pdb
64+
*.pgc
65+
*.pgd
66+
*.rsp
67+
*.sbr
68+
*.tlb
69+
*.tli
70+
*.tlh
71+
*.tmp
72+
*.tmp_proj
73+
*.log
74+
*.vspscc
75+
*.vssscc
76+
.builds
77+
*.pidb
78+
*.log
79+
*.scc
80+
81+
# Visual C++ cache files
82+
ipch/
83+
*.aps
84+
*.ncb
85+
*.opensdf
86+
*.sdf
87+
*.cachefile
88+
89+
# Visual Studio profiler
90+
*.psess
91+
*.vsp
92+
*.vspx
93+
94+
# Guidance Automation Toolkit
95+
*.gpState
96+
97+
# ReSharper is a .NET coding add-in
98+
_ReSharper*/
99+
*.[Rr]e[Ss]harper
100+
101+
# TeamCity is a build add-in
102+
_TeamCity*
103+
104+
# DotCover is a Code Coverage Tool
105+
*.dotCover
106+
107+
# NCrunch
108+
*.ncrunch*
109+
.*crunch*.local.xml
110+
111+
# Installshield output folder
112+
[Ee]xpress/
113+
114+
# DocProject is a documentation generator add-in
115+
DocProject/buildhelp/
116+
DocProject/Help/*.HxT
117+
DocProject/Help/*.HxC
118+
DocProject/Help/*.hhc
119+
DocProject/Help/*.hhk
120+
DocProject/Help/*.hhp
121+
DocProject/Help/Html2
122+
DocProject/Help/html
123+
124+
# Click-Once directory
125+
publish/
126+
127+
# Publish Web Output
128+
*.Publish.xml
129+
*.pubxml
130+
131+
# NuGet Packages Directory
132+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133+
#packages/
134+
135+
# Windows Azure Build Output
136+
csx
137+
*.build.csdef
138+
139+
# Windows Store app package directory
140+
AppPackages/
141+
142+
# Others
143+
sql/
144+
*.Cache
145+
ClientBin/
146+
[Ss]tyle[Cc]op.*
147+
~$*
148+
*~
149+
*.dbmdl
150+
*.[Pp]ublish.xml
151+
*.pfx
152+
*.publishsettings
153+
154+
# RIA/Silverlight projects
155+
Generated_Code/
156+
157+
# Backup & report files from converting an old project file to a newer
158+
# Visual Studio version. Backup files are not needed, because we have git ;-)
159+
_UpgradeReport_Files/
160+
Backup*/
161+
UpgradeLog*.XML
162+
UpgradeLog*.htm
163+
164+
# SQL Server files
165+
App_Data/*.mdf
166+
App_Data/*.ldf
167+
168+
#############
169+
## Windows detritus
170+
#############
171+
172+
# Windows image file caches
173+
Thumbs.db
174+
ehthumbs.db
175+
176+
# Folder config file
177+
Desktop.ini
178+
179+
# Recycle Bin used on file shares
180+
$RECYCLE.BIN/
181+
182+
# Mac crap
183+
.DS_Store
184+
185+
186+
#############
187+
## Python
188+
#############
189+
190+
*.py[co]
191+
192+
# Packages
193+
*.egg
194+
*.egg-info
195+
dist/
196+
build/
197+
eggs/
198+
parts/
199+
var/
200+
sdist/
201+
develop-eggs/
202+
.installed.cfg
203+
204+
# Installer logs
205+
pip-log.txt
206+
207+
# Unit test / coverage reports
208+
.coverage
209+
.tox
210+
211+
#Translations
212+
*.mo
213+
214+
#Mr Developer
215+
.mr.developer.cfg

About.aspx

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="Exemplo.About" %>
2+
3+
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
4+
<hgroup class="title">
5+
<h1><%: Title %>.</h1>
6+
<h2>Your app description page.</h2>
7+
</hgroup>
8+
9+
<article>
10+
<p>
11+
Use this area to provide additional information.
12+
</p>
13+
14+
<p>
15+
Use this area to provide additional information.
16+
</p>
17+
18+
<p>
19+
Use this area to provide additional information.
20+
</p>
21+
</article>
22+
23+
<aside>
24+
<h3>Aside Title</h3>
25+
<p>
26+
Use this area to provide additional information.
27+
</p>
28+
<ul>
29+
<li><a runat="server" href="~/">Home</a></li>
30+
<li><a runat="server" href="~/About">About</a></li>
31+
<li><a runat="server" href="~/Contact">Contact</a></li>
32+
</ul>
33+
</aside>
34+
</asp:Content>

About.aspx.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
namespace Exemplo
9+
{
10+
public partial class About : Page
11+
{
12+
protected void Page_Load(object sender, EventArgs e)
13+
{
14+
15+
}
16+
}
17+
}

About.aspx.designer.cs

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Account/Login.aspx

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<%@ Page Title="Log in" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Exemplo.Account.Login" %>
2+
<%@ Register Src="~/Account/OpenAuthProviders.ascx" TagPrefix="uc" TagName="OpenAuthProviders" %>
3+
4+
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
5+
<hgroup class="title">
6+
<h1><%: Title %>.</h1>
7+
</hgroup>
8+
<section id="loginForm">
9+
<h2>Use a local account to log in.</h2>
10+
<asp:Login runat="server" ViewStateMode="Disabled" RenderOuterTable="false">
11+
<LayoutTemplate>
12+
<p class="validation-summary-errors">
13+
<asp:Literal runat="server" ID="FailureText" />
14+
</p>
15+
<fieldset>
16+
<legend>Log in Form</legend>
17+
<ol>
18+
<li>
19+
<asp:Label runat="server" AssociatedControlID="UserName">User name</asp:Label>
20+
<asp:TextBox runat="server" ID="UserName" />
21+
<asp:RequiredFieldValidator runat="server" ControlToValidate="UserName" CssClass="field-validation-error" ErrorMessage="The user name field is required." />
22+
</li>
23+
<li>
24+
<asp:Label runat="server" AssociatedControlID="Password">Password</asp:Label>
25+
<asp:TextBox runat="server" ID="Password" TextMode="Password" />
26+
<asp:RequiredFieldValidator runat="server" ControlToValidate="Password" CssClass="field-validation-error" ErrorMessage="The password field is required." />
27+
</li>
28+
<li>
29+
<asp:CheckBox runat="server" ID="RememberMe" />
30+
<asp:Label runat="server" AssociatedControlID="RememberMe" CssClass="checkbox">Remember me?</asp:Label>
31+
</li>
32+
</ol>
33+
<asp:Button runat="server" CommandName="Login" Text="Log in" />
34+
</fieldset>
35+
</LayoutTemplate>
36+
</asp:Login>
37+
<p>
38+
<asp:HyperLink runat="server" ID="RegisterHyperLink" ViewStateMode="Disabled">Register</asp:HyperLink>
39+
if you don't have an account.
40+
</p>
41+
</section>
42+
43+
<section id="socialLoginForm">
44+
<h2>Use another service to log in.</h2>
45+
<uc:OpenAuthProviders runat="server" ID="OpenAuthLogin" />
46+
</section>
47+
</asp:Content>

Account/Login.aspx.cs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
namespace Exemplo.Account
9+
{
10+
public partial class Login : Page
11+
{
12+
protected void Page_Load(object sender, EventArgs e)
13+
{
14+
RegisterHyperLink.NavigateUrl = "Register";
15+
OpenAuthLogin.ReturnUrl = Request.QueryString["ReturnUrl"];
16+
17+
var returnUrl = HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
18+
if (!String.IsNullOrEmpty(returnUrl))
19+
{
20+
RegisterHyperLink.NavigateUrl += "?ReturnUrl=" + returnUrl;
21+
}
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)