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 7647871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:34:13+00:00 2026-05-31T10:34:13+00:00

What I have : A C# database query that returns two columns, one of

  • 0

What I have : A C# database query that returns two columns, one of which contains a start time of a meeting, the other of which contains the end time. The times are of the same time period and cannot be over two days.

What I would like to do : Cycle through these returned values, and create a dropdown box for each day containing the start-corresponding end time. If there are no values for a certain day, display the message “No times free for this day”.

My code so far :

  var result = db.Query(//returns two columns, ds and de, two dateTimes meaning the start and end date of an event.)

<form id="form" name="form" method="post" action="insert.cshtml">
    <label>@result.First().ds.DayOfWeek <select name="start_to_end_time"></label> 
        @foreach(var record in result) {
             if(day.Equals(record.ds.DayOfWeek)) {
                 <option value="@record.ds">@record.ds.ToString("HH:mm") - @record.de.ToString("HH:mm")</option>
                } else {
                    </select>
                    <label>@record.ds.DayOfWeek<select name="start_to_end_time"></label>
                    <option value=@record.ds>@record.ds.ToString("HH:mm") - @record.ds.ToString("HH:mm")</option>
                }  
        }

This throws the error : “Encountered end tag “select” with no matching start tag. Are your start/end tags properly balanced?”

However, looking at my code, I believe they are balanced correctly? Can anybody help me with this please?

  • 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-05-31T10:34:14+00:00Added an answer on May 31, 2026 at 10:34 am

    You have the equivalent of this which is invalid markup:

    <label> <select></label> 
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables with some ID's and I need a query that returns
I have two arrays (records returned from a database query) that I'm merging. I
I have a tool that is setup to query our Clearquest Database to return
I have a Microsoft Access database query that I'm trying to import into a
I have the following query that runs in my Oracle database and I want
I have a form that shows results from a database query, these results can
Possible Duplicate: SQL Server Database query help Hi, I have a problem that I
I have a Delphi 2009 application that runs a query over a database using
I have a DataGrid which is being bound dynamically to a database query. The
I have a requirement to run a query against a database that will return

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.