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

  • SEARCH
  • Home
  • 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 5840469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:44:59+00:00 2026-05-22T11:44:59+00:00

I have a dropdown box which is used to select a user from a

  • 0

I have a dropdown box which is used to select a user from a database. I am then populating a number of textboxes with the user information from the database. I want to populate a dropdown box, which holds the user’s role, dependent on which user is selected from the first drop down box.

Here is my code:

    Dim currentUser As String = editUserDropDown.SelectedValue
    Dim getUserDetails = "Select aspnet_Users.UserName, aspnet_Roles.RoleName, [User Details].EmployeeName, [User Details].EmployeeAddress, [User Details].PersonalEmailAddress FROM aspnet_Users INNER JOIN [User Details] ON aspnet_Users.UserId = [User Details].UserId CROSS JOIN aspnet_Roles WHERE (aspnet_Users.UserName = '" & currentUser & "')"
    Dim getUserDetailsCmd As New SqlClient.SqlDataAdapter(getUserDetails, DBConn)
    Dim getUserDetailsDS As New DataSet
    getUserDetailsCmd.Fill(getUserDetailsDS)

    Dim username = getUserDetailsDS.Tables(0).Rows(0).Item(0)
    Dim roleName = getUserDetailsDS.Tables(0).Rows(0).Item(1)
    Dim name = getUserDetailsDS.Tables(0).Rows(0).Item(2)
    Dim address = getUserDetailsDS.Tables(0).Rows(0).Item(3)
    Dim email = getUserDetailsDS.Tables(0).Rows(0).Item(4)


    userNameTxt.Text = username

    roleSelect.SelectedValue = roleName

    nameTxt.Text = name
    addressTxt.Text = address.Trim()
    emailTxt.Text = email

any help is greatly appreciated

  • 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-22T11:45:00+00:00Added an answer on May 22, 2026 at 11:45 am

    You have to do this by doing a Post-back on the fist select drop down and then getting the content for the second one depending of the selection made on the first…

    Hoped that helped!

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

Sidebar

Related Questions

I have used a prototype plugin which filters the contents of a dropdown as
I have a dropdown box that allows users to select how many inputs they
I have a dropdown box and a literal tag inside an Update Panel. On
I have three values I need to align in a dropdown box. How can
On my page I have a drop-down select box, with a default value of
I have some onchange events setup in jQuery which are used to populate a
I've seen jquery used to change a form select drop down box in to
I have this simple Select box that is suppose to store the selected value
I have a text box which accepts time(max of 5 characters only), and a
I have multi-select drop down list where in user can select multiple options, now

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.