Solved

Web Page Design Connected Drop-Downs

Posted on 2010-08-13
4
377 Views
Last Modified: 2012-05-10
I am trying to design a page with linked drop-downs so that when you make one selection the next drop down is limited to items within that selection. My code is listed below. One other problem I am having is that it is listing duplicates of all items that are listed more than once in the database, is there a way to fix that too?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
</head>

<body>

<form id="form1" runat="server">
	<asp:DropDownList runat="server" id="DropDownList1" DataValueField="ReportedBy" DataTextField="ReportedBy" DataSourceID="SqlDataSource1">
	</asp:DropDownList>
	<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ChecklistConnectionString %>" SelectCommand="SELECT * FROM [Sorted Responses Comm]">
	</asp:SqlDataSource>
	<asp:DropDownList runat="server" id="DropDownList2" DataValueField="DateReported" DataTextField="DateReported" DataSourceID="SqlDataSource1">
	</asp:DropDownList>
	<asp:DropDownList runat="server" id="DropDownList3" DataValueField="Title" DataTextField="Title" DataSourceID="SqlDataSource1">
	</asp:DropDownList>
	<asp:TextBox runat="server" id="TextBox1"></asp:TextBox>
</form>

</body>

</html>

Open in new window

0
Comment
Question by:141ANG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 33435560
0
 
LVL 18

Accepted Solution

by:
mgfranz earned 500 total points
ID: 33436822
When you write a SELECT statement using the *, (everything), you will literally pull everything in the table.  If you use DISTINCT in your query you will not get duplicate records, like this;

SELECT distinct fldTitle FROM myMovies

There is also a qualifier called DISTINCTROW but your database might not accept this.
0
 
LVL 1

Author Closing Comment

by:141ANG
ID: 33468127
worked perfect thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question