Home Register member using the Member API in Umbraco 7
Reply: 0

Register member using the Member API in Umbraco 7

Leth
1#
Leth Published in 2017-09-13 07:58:08Z

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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.451111 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO