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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:13:16+00:00 2026-05-25T22:13:16+00:00

My database has an Employee table, which has a column SupervisorId, which as you

  • 0

My database has an Employee table, which has a column SupervisorId, which as you would expect is a foreign key into the Employee table.

Currently, in my Create.cshtml view/form, for the supervisor field, I have a combo box with Employee.Name as the data text, and Employee.EmployeeId as their data value. Then in the controller I do this:

     ViewBag.SupervisorId = new SelectList(db.Employees, "EmployeeId", "Name");

This actually works pretty slick, but obviously it won’t scale well at all.

What I want is to just display the supervisor name in a non-editable text box, and then have a browse button that opens a div (worst case scenario, I’ll use a pop up), that allows them to search an employee and select them -> placing their name in the text box. No the ID of supervisor is not visible. I am kind of at a loss about how to go about this.

For the search, I suppose I’d use JS to set a hidden form variable with the supervisor’s id, when the select a result? Or how do I store the supervisor value, so that it is set correctly on the Employee when submit is clicked?

Can someone point me in the right direction, I don’t need a coded solution, but just an overview. I am using the free Telerik controls if that helps.

Thanks.

  • 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-25T22:13:16+00:00Added an answer on May 25, 2026 at 10:13 pm

    Yes, you could use a read-only textbox to hold the value. No problem there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to query my database table to find which employee has the most
Working on a website that has Employee and Branch entities, using a database table
My database has a parent table with an auto-incrementing primary key identity 'ID', and
My database has a table with thousands of records. The primary key is an
I am currently working on a project which has Employee, Manager entities. At the
I have an EMPLOYEE table in a SQL Server 2008 database which stores information
I have an Entity Framework model with table Employees. Each employee has a SupervisorId,
I have the following tables in my database: Employee Table which consists of Name,
I have project which contain 4 tables among these shedule table Session column i
I have a database that logs when an employee has attended a course and

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.