Copied to clipboard

Flag this post as spam?

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


  • Johan 95 posts 264 karma points
    Dec 11, 2015 @ 12:37
    Johan
    0

    Mail to all

    I want to be able to mailto all user with a link/button.

    To display one user mail is @syv.ePost:

    @{
        var syvs = CurrentPage.Children.OrderBy("kommun");
    }
    
      @foreach (var syv in syvs)
                            {
    <tr>
     <td data-title="E-post">
                                        @if (!string.IsNullOrEmpty(syv.ePost))
                                        {
    
                                            <a href="mailto:@syv.ePost" target="_top">@syv.ePost</a>
                                        }
                                        else
                                        {
                                            <text>&nbsp;</text>
                                        }
                                    </td>
                                </tr>
    

    This will list all e-mails.

    Now I want to make a button that mails to all when clicking it.

    I tried doing like this:

       @*@foreach (var syv in syvs)
            {
               <a href="mailto:@syv.ePost" target="_top">@syv.ePost</a>
    
            }*@
    

    But this list all the mail again. I want one link that mails to all. How do I do it?

Please Sign in or register to post replies

Write your reply to:

Draft