?
Solved

C# Dropdown list in sql table?

Posted on 2010-11-23
6
Medium Priority
?
565 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 1500 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Viewers will learn how the fundamental information of how to create a table.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

829 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