-
Notifications
You must be signed in to change notification settings - Fork 50
/
Contact.cshtml
43 lines (38 loc) · 1.2 KB
/
Contact.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@using reCAPTCHA.AspNetCore
@using reCAPTCHA.AspNetCore.Versions;
@using Microsoft.Extensions.Options
@model ContactModel
@inject IOptions<RecaptchaSettings> RecaptchaSettings;
@{
ViewData["Title"] = "Contact";
}
<!--
This is the default example for using the library.
-->
<h2>@ViewData["Title"]</h2>
<h3>@ViewData["Message"]</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>
@using (Html.BeginForm("Contact", "Home", FormMethod.Post))
{
@Html.ValidationSummary(true)
<fieldset>
<div class="form-group">
@Html.LabelFor(model => model.Message)
<br />
@Html.TextAreaFor(model => model.Message, new { @class = "form-control", rows = "3", style = "width: 300px;" })
</div>
<div class="form-group">
@(Html.Recaptcha<RecaptchaV2Checkbox>(RecaptchaSettings.Value))
</div>
<button id="recaptcha" type="submit" class="btn btn-primary">Submit</button>
</fieldset>
}