Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:21:39+00:00 2026-06-01T07:21:39+00:00

I don’t really know how to deal with the next issue : So, I’ve

  • 0

I don’t really know how to deal with the next issue :

So, I’ve a webbased application developped with ASP.NET MVC3, which is used to remember when an event is relayed to some people.

I’ve 3 tables

Contact
 id_contact
 name
 firstname
 ...

event
 id_event
 ...

transmission
 FK_id_event
 FK_id_firstname
 mailed (boolean)
 phoned (boolean)

For each event, I need to list all the contacts that are related to this event. And for each contact, I need to display 2 checkboxes that have to be checked if the contact has been called or mailed.

    '
    ' GET: /Event/Details/5

    Function Details(id As Integer) As ViewResult
        Dim event As event = db.event.Single(Function(o) o.idOpportunite = id)

        Dim contacts = (From a In db.contact, b In db.transmission
                       Where a.id_Contact = b.FK_id_contact And b.FK_id_event = id
                       Select a)
        Dim transmission = (From a In contacts, b In db.transmission
                        Where a.id_Contact = b.FK_trans_cont
                        Select b)

        Dim model = New EventDetails With {
            .event= event,
            .Contacts = contacts,
            .TransOpp = transopp
            }

        Return View(model)
    End Function

I don’t know if the “transmission” part of the code is good or not.

Here in the view, this is were I display the contacts

        @For Each contact In Model.contacts
            @<tr>
                <td>
                    @Html.ActionLink(contact.name + " " + contact.firstname , "Details", New With {.id = contact.idContact})
                </td>
                <td>
                    @Html.Raw(contact.phone)
                </td>
                <td>
                    @*Html.DisplayFor(Function(modelItem) currentItem.mail)*@
                    <a href=mailto:@contact.mail>@Html.Raw(contact.mail)</a>
                </td>
                <td>
                   ***My checkboxes should be here***
                </td>
            </tr>
        Next

So, my question is, what should I do to display those checkboxes?

(sorry if I’m not understandable, I’m not a native english speaker. Don’t hesitate to edit my english mistakes (or the title which is not a great one)).

With the help of Yasser, I’ve done this :

                    @code
                    Dim mail As Boolean = (From a In Model.Event
                    Where a.FK_id_contact = contact.idContact And a.FK_id_event = Model.Opportunite.idOpportunite
                    Select a.mailed)

                    End Code

However, I get an error :
Value of type ‘System.Collections.Generic.IEnumerable(Of Boolean)’ cannot be converted to ‘Boolean’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:21:41+00:00Added an answer on June 1, 2026 at 7:21 am

    Here is something that should help

     @{ 
     bool isMailed =  // set values;
     bool isPhoned = // set values
      }
    @Html.CheckBox("mailed ", isMailed );
    @Html.CheckBox("phoned", isPhoned );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't really know how to formulate the title, but it should be pretty obvious
I don't know whether this is really possible, but I'm trying my best. If
Don't know what's wrong here, when I run the application it says Specified method
Don't know why, but sometimes LocationManager is still working also after closing application. I
Don't know how to google for such, but is there a way to query
Don't know why but font is not displaying.Please help. CSS(in css folder): style.css: @font-face
I don't know if this is a well known 'thing' or something new in
I don't want to know a way to preload images, I found much on
I used javascript for loading a picture on my website depending on which small
Don't know if I worded the question right, but basically what I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.