Solved

C# Dropdown list in sql table?

Posted on 2010-11-23
6
552 Views
Last Modified: 2012-05-10
The C# web application has to pull a couple of drop down list in a form that will be cascade filter. For example depending on selection 1 in the dropdown list 1 the drop down list 2 will be populated.

What is the best way to populate the 2 dropdownlists. in the form. Not sure if i have the data in teh table form in sql tables.
0
Comment
Question by:XPLR
  • 4
  • 2
6 Comments
 
LVL 13

Expert Comment

by:iHadi
ID: 34200528
I suggest you do it using ajax. You can use the ajax Control Toolkit to do so:

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/CascadingDropDown/CascadingDropDown.aspx

or any other Ajax library like jQuery
0
 

Author Comment

by:XPLR
ID: 34206041
The example is exactly what i needed but it uses webservices and i was hoping to do with something easier..
0
 
LVL 13

Accepted Solution

by:
iHadi earned 500 total points
ID: 34208032
Webservices are very easy to build and use. They are even easier than web pages to build. They do not need to be in a separate project. You can add a webservice asmx file as easily as adding an aspx file.

After you add it, all you need is to write your method in it and decorate it with the some attributes. That's it.

If you need help with that, just post here.
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

Author Comment

by:XPLR
ID: 34345838
Can you give me an example of webservice method? I know how to create a webservice add file.
Also should you still use sql datasource or object data source?
0
 

Author Comment

by:XPLR
ID: 34346800
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Walkthrough/CCDWithDB.aspx -This example is complicated and i am new to .net/ajax coding. Also we are using a third party (telerik) for cascading drop down control. I'de appreciate if you can give a simple example
0
 

Author Closing Comment

by:XPLR
ID: 35796799
Looks like a complex solution
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
The viewer will learn how to dynamically set the form action using jQuery.
Viewers will learn how the fundamental information of how to create a table.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now