C#C
C#12mo ago
Dani

most simple form (impossible)

want to do the most basic of basic thing and thats to send a form and get the value of it right now i got this page:
@page "/Register"
@using Microsoft.AspNetCore.Identity
@using System.ComponentModel.DataAnnotations
@using learning.Models

<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h3 class="text-center">Register</h3>
                    <h1>Status: @status</h1>
                </div>
                <div class="card-body">
                    <EditForm Model="@registerModel" OnValidSubmit="@HandleValidSubmit" FormName="registerModel">
                        <DataAnnotationsValidator />
                        <ValidationSummary />

                        <div class="form-group">
                            <label for="email">Email</label>
                            <InputText class="form-control" @bind-Value="registerModel.Email" />
                        </div>

                        <div class="form-group">
                            <label for="password">Password</label>
                            <InputText type="password" class="form-control" @bind-Value="registerModel.Password" />
                        </div>

                        <div class="form-group">
                            <label for="confirmPassword">Confirm Password</label>
                            <InputText type="password" class="form-control" @bind-Value="registerModel.ConfirmPassword" />
                        </div>

                        <button type="submit" class="btn btn-primary btn-block mt-3">Register</button>
                    </EditForm>

                    <div class="mt-3 text-center">
                        <a href="/account/login">Already have an account? Login here</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
Was this page helpful?