File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
RazorComponentFive/Shared
RazorComponentTen/RazorComponentTen/Pages Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
var builder = WebApplication . CreateBuilder ( ) ;
2
2
builder . Services . AddRazorComponents ( ) ;
3
-
3
+ builder . Services . AddAntiforgery ( ) ;
4
4
var app = builder . Build ( ) ;
5
+ app . UseAntiforgery ( ) ;
5
6
app . MapRazorComponents < RazorComponentEleven . App > ( ) ;
6
7
app . Run ( ) ;
7
8
Original file line number Diff line number Diff line change 5
5
<head >
6
6
<meta charset =" utf-8" >
7
7
<meta name =" viewport" content =" width=device-width, initial-scale=1" >
8
- <title >Blazor United </title >
8
+ <title >Blazor</title >
9
9
<
link href =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css" rel =
" stylesheet" integrity =
" sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin =
" anonymous" >
10
10
</head >
11
11
<body >
Original file line number Diff line number Diff line change 1
1
var builder = WebApplication . CreateBuilder ( ) ;
2
2
builder . Services . AddRazorComponents ( ) ;
3
+ builder . Services . AddAntiforgery ( ) ;
3
4
4
5
var app = builder . Build ( ) ;
5
-
6
+ app . UseAntiforgery ( ) ;
6
7
app . MapRazorComponents < RazorComponentOne . App > ( ) ;
7
8
app . Run ( ) ;
8
9
Original file line number Diff line number Diff line change 7
7
<div class =" col-md-3" >
8
8
<h2 >SSR</h2 >
9
9
@_message
10
- <EditForm method =" POST" EditContext =" _editContext" OnValidSubmit =" ShowMessage" >
10
+ <EditForm method =" POST" EditContext =" _editContext" FormName = " ShowMessage " OnValidSubmit =" ShowMessage" >
11
11
<button class =" btn btn-primary" >Show Message</button >
12
12
</EditForm >
13
13
</div >
You can’t perform that action at this time.
0 commit comments