Solved

C# Dropdown list in sql table?

Posted on 2010-11-23
6
550 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:XPLR
Comment Utility
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
Comment Utility
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
Comment Utility
Looks like a complex solution
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

771 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

10 Experts available now in Live!

Get 1:1 Help Now