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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:09:41+00:00 2026-06-16T00:09:41+00:00

I am using a user dropdown which comes in most of add/edit pages which

  • 0

I am using a user dropdown which comes in most of add/edit pages which comes from database. Right now in all actions, I am getting the users in a viewbag and creating dropdown in the view. Is this the right way? Can someone help me in a way I can call one usercontrol and the dropdown is created with proper name and value. Or can someone suggest what is the right method.

  • 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-16T00:09:41+00:00Added an answer on June 16, 2026 at 12:09 am

    What you should do, is create a base ViewModel class, which contains the values for the dropdown. Than let all other ViewModels inherit from the base class.

    Than create an ActionFilter that fills the DropdownMenu Items list. The _Layout view should have the dropdown in it.

    Here is a working solution

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

Sidebar

Related Questions

I have a user form that has dropdown boxes which i have populated using
Im using Linq to return IDs from 4 cascading dropdown menus. The user may
I am using a dropdown to allow the user to sort search results. These
I'm currently using: @user = User.find(params[:id]) @posts = Post.find(:all, :conditions => [user_id = ?,
using fconnect user have authenticated and i have saved their userid to my database.
i am using a dropdown in php which asks for user_category before creating the
I want to make a language selection dropdown in a site user edit/create page.
I am using a multi select dropdown which is populated dynamically. How do I
I am using a dropdown plugin called dropkick , which replaces select menus with
using c# (asp.net) i'm programmatically creating several drop down lists (random number). the user

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.