Copied to clipboard

Flag this post as spam?

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


  • Sean Valentine 10 posts 99 karma points
    Jul 19, 2015 @ 14:17
    Sean Valentine
    0

    Am i doing this right? (Href link and querystring)

    Hi,

    So i'm trying to find the best practise to link to different pages within my umbraco app.

    I want to move from my new-leads page to a profile page. I've tried using a Surface Action / Controller but i can only return a partial view (At least that's what i understand)

    So my current HTML looks like this.

    <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @item.Id
                            </td>
                            <td>
                                @string.Format("{0} {1}", item.FirstName, item.LastName)
                            </td>
                            <td>
                                @item.Address
                            </td>
                            <td>
                                @item.EmailAddress
                            </td>
                            <td>
                                @item.PhoneNumber
                            </td>
                            <td>
                                @Enum.GetName(typeof(CustomerStatus), item.CustomerStatus).Replace("_", " ")
                            </td>
                            <td>
                                <a href="~/backend/[email protected]" class="label label-primary">Manage</a>
                            </td>
                        </tr>
                    }
                </tbody>
    

    Is this the right way to do it? When the Profile page loads it expects a querystring and this is the only way i can figure out how to do it. Although it works and i'm happy to continue this way i was wondering what is 'Best Practise' and maybe i should be doing it a different way.

    Any help / advice will be appreciated and the best answer shall receive my first born*





    *Need to speak to the Mrs first but i think she'll be fine with it.

  • Sean Valentine 10 posts 99 karma points
    Jul 28, 2015 @ 16:45
    Sean Valentine
    0

    can anyone help on this?

  • Casper Andersen 126 posts 508 karma points
    Jul 29, 2015 @ 11:14
    Casper Andersen
    0

    Do yourself a favor and go into the umbraco backoffice and create a partial viewm here you can choose the template type, set the type as navigation and see how it links to the different pages, if that does not make any sensem reply here with your questions and i shall try and help you out

Please Sign in or register to post replies

Write your reply to:

Draft