[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Business Layer - Data Access Layer - Multiple Drop-Down Lists - ASP.NET

Posted on 2007-11-21
6
Medium Priority
?
671 Views
Last Modified: 2013-11-26
Hello

I am currently writing a 3 tier application for the first time. After reading a lot about the theory behind it, I am now beginning to implement it. I have various pages where the user makes a selection based on mulitple dependant drop-down lists.

For example if the user were searching for a vehicle:
1st drop-down list: vehicle type (chosen by user: car/automobil)
2nd drop-down list: make (chosen by user: Toyota)
3rd drop-down list: model (chosen by user: Prius)

hence whatever the user chooses in the first drop-down list, then populates the 2nd drop-down list, and so forth.

How would I implement this on the webpage and in the business / data access layers? Ideally the page would not reload after the selection has been made on a drop-down list.

Any ideas?
0
Comment
Question by:riffrack
[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
6 Comments
 
LVL 16

Accepted Solution

by:
SQL_SERVER_DBA earned 1400 total points
ID: 20328366
0
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 20328377
This has very little to do with the business/data access layers - except that this is where you get your data from.

The reloading of the page is entirely a matter of Presentation - your UI layer.

With classic Web programming there is no way to do this without either prefetching ALL the data, or reloading the page.

With AJAX, you do not reload the page, you simply request additional information for the current page.
0
 
LVL 21

Assisted Solution

by:surajguptha
surajguptha earned 600 total points
ID: 20328389
1) I guess all the models/ cars/ makes would be not a lot of data. You could fetch all of it on form load and use javascript to show the relevant make for a car

2) You could design two middle tier functions that take vehcle and return all makes and take one make and return all models. You could use ajax in this case to make sure that the page is not posted back after the dropdowns are selected
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:riffrack
ID: 20329712
Thanks SQL Server Dba.....that solves the drop-down list issue.

This application is fairly small & most the interaction will be between the db and the website. Not much validation, as the user is quite limited.

My question related to the business logic refers to the case that I have a webpage with multiple drop-down lists & a database table. How do I get these 2 parts to optimally communicate in a 3-tier approach?
0
 
LVL 10

Expert Comment

by:Alpesh Patel
ID: 20329993
Your requirement is just nothing but a synchronisation of   AJAX , UI and Web Service and DataBase.

here,

UI is your 1st tier
Webservice is your 2nd tier same the business layer
DataBase is your 3rd tier.

now from your discription i guess that u are new for web applicaitons so u must be awair  with the webservice

here your webservice would have that webmethods which gives u data for that 3dropdown
and

you can just call that method to filled up that dropdown on perticular event
means.

-- on the selectedchange event of the 1st dropdown.. fill up the second one
-- on the selectedchange event of the 2nd dropdown.. fill up the third one....... and go on............

i think this above discription will give u clear view how to use business layer and synchronise your UI for that....

now u want one more thing to do is that u dont want to reload the page on each selctedchange event of dropdown...... for that u have to use AJAX

now for AJAX u have to download AJAX free framework and install it on your computer .... u can do it from
http://www.asp.net/ajax/

now as u create webapplication from studio 2005, u have to create AJAX based webapplication, which u can get option in new application wizard, or u can get study from the video tutorial  http://www.asp.net/learn/ajax-videos/

get the study of AJAX application and make your above application AJAX based
u can also convert your existing asp.net applicaiton in to the AJAX base asp.net application.

if u need anyting more u can knock me.

thanx and regards


0
 

Author Comment

by:riffrack
ID: 20340468
Thanks all of you for your help. I have used the cascading drop-down lists from the ajaxControlToolbox & have used a middle tier to acces the data.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 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