Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C# Dropdown list in sql table?

Posted on 2010-11-23
6
Medium Priority
?
561 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
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

618 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