Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ThomasBrunbjerg 90 posts 182 karma points
    Sep 13, 2017 @ 07:47
    ThomasBrunbjerg
    0

    Source code for Member API videos

    I'm following the tutorial videos on Umbraco TV for the Member API, however there doesn't appear to be a link to the source code. I am having a bit of trouble following the tutorial since he doesn't show all the code that is typed and I'm not sure how to successfully register a member in my partal view.

    This is currently my code for the register partial view:

    @using LoevbjergRema1000Umbraco.Controllers
    @model LoevbjergRema1000Umbraco.Models.RegisterModel
    
    @using (Html.BeginUmbracoForm<RegisterController>("Register"))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)
    
        <fieldset>
            <div class="editor-label">
                @Html.LabelFor(model => model.Name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Email)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Password)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Biography)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Biography)
                @Html.ValidationMessageFor(model => model.Biography)
            </div>
            <button class="btn btn-primary" type="submit">Register</button>
        </fieldset>
    

    But I don't know what to do with the register button to make it call the method in my controller to create the member, it is not shown in the video.

    I'm also slightly confused as to how i correctly create the templates for the register and login view. Do they need their own separate document type?

    Sorry, I'm just really confused by this tutorial as a lot of stuff is being done behind the videos. If anyone has a link to the source code the videos I'd appreciate it as well.

Please Sign in or register to post replies

Write your reply to:

Draft