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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:10:10+00:00 2026-06-02T04:10:10+00:00

I have a SQL db that holds the records for my page. On my

  • 0

I have a SQL db that holds the records for my page. On my page I have a details view I want to populate with records from my db. I can populate the records just fine, I need to be able to populate in records based on a user selection from a drop box?

To clarify, on my main page I have a drop down list with years (ie. 2011, 2010, 2009), and a drop down containing account codes (ie. six-digit numbers). Based on what the user chooses for the year (for example 2010) and the what they choose for the account code (for example 123456) I want to populate the details view (which is on a seperate page) with only those records from 2010 and with the account code 123456??

Far far haven’t seen a way to make it work?

  • 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-02T04:10:13+00:00Added an answer on June 2, 2026 at 4:10 am

    To fill the DetailsView based on input from form controls is actually quite straightforward. You’re basically using the controls to supply parameter values to plug into the WHERE clause of a select statement.

    In essence, you define your SqlDataSource to take Control parameters.

    There’s also documentation here: http://msdn.microsoft.com/en-us/library/z72eefad.aspx

    And an article with screenshots here: http://www.asp.net/web-forms/tutorials/data-access/accessing-the-database-directly-from-an-aspnet-page/using-parameterized-queries-with-the-sqldatasource-vb

    If the details view is on a different page, you can do the same thing using QueryString parameters, but that leaves you open to tampering. (People changing the values in thequery string to get at records they shouldn’t see.) If tampering isn’t an issue with your specific situation – the data isn’t sensitive in nature, then it shouldn’t be an issue, but its’ something to be aware of.

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

Sidebar

Related Questions

I have several sql queries that I simply want to fire at the database.
I have SQL table that holds buyers personal data such as FirstName, LastName, OGCard;
I have an sql table of PlayerTrial that holds, well, player trials. ---PlayerTrials Basic
I have a SQL script that populates a temp column and then drops the
I have a SQL database that has a table with a field set to
i have a sql server that i use and i am trying to code
I have a sql statement that uses Difference => http://msdn.microsoft.com/en-us/library/ms188753.aspx I do this in
I have some sql statements that calculates some numbers. It's possible (with bonus points/penalty
I have an SQL statement that I'm executing through OleDb, the statement is something
I have a SQL procedure that generates a util file as its output depending

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.