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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:03:58+00:00 2026-06-17T00:03:58+00:00

I’m new to both Visual Studio and ASP.NET. I’m creating this project for my

  • 0

I’m new to both Visual Studio and ASP.NET.

I’m creating this project for my Data Base course in the university and I want to make it web-based with Visual Studio. So I’ve created my site, imported the DB, etc. and now I want to create a query with user input parameter. Using the query builder I’ve created the following SQL statement:

SELECT [Column1], [Column2], Column3 
FROM [DataBaseTable]
WHERE ([Column1] = ?)

The next step in the query builder is where I need to define the parameter source. I figured out that I need a control source, using a DropDownList. I’ve created the list items and assigned the list to the parameter via the control option.

So, now when I launch my site the query is working, getting the value from the first list item. The problem is that I want to change the query value dynamically by choosing a different list item. What do I need to do to make it so?

EDIT: This is the code:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" Height="269px" Width="923px">
    <Columns>
        <asp:BoundField DataField="Column1" HeaderText="Column1" SortExpression="Column1" />
        <asp:BoundField DataField="Column2" HeaderText="Column2" SortExpression="Column2" />
        <asp:BoundField DataField="Column3" HeaderText="Column3" SortExpression="Column3" />
    </Columns>
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/Road.accdb" SelectCommand="SELECT [Column1], [Column2], [Column3] FROM [Второкласни пътища] WHERE ([Column1] = ?)">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="?" PropertyName="SelectedValue" />
    </SelectParameters>
</asp:AccessDataSource>
<asp:DropDownList ID="DropDownList1" runat="server">
    <asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
</asp:DropDownList>
  • 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-17T00:03:59+00:00Added an answer on June 17, 2026 at 12:03 am

    Based on your code, I think you may only need one small change. Add “AutoPostBack=”true” to your DDL. I would also give your ListItems explicit values, to be more clear. This way you can set the ListItem text to something useful (whatever the number is supposed to represent in your DB).

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
        <asp:ListItem Value="1">1</asp:ListItem>
        <asp:ListItem Value="2">2</asp:ListItem>
        <asp:ListItem Value="3">3</asp:ListItem>
    </asp:DropDownList>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.