Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SP for dropdown selection

Author  Topic 

susan_151615
Yak Posting Veteran

99 Posts

Posted - 2008-12-21 : 01:39:00
Hi I have a web page where when the page loads certain "company" values must be loaded to dropdown list1 from the backend from Table 1

again when i select any company from the dropdown1 certain "vendor " values for the company which is selected in the dropdownlist1 must be loaded to dropdonlist2 from table 1

Again when i select any vendor from the dropdown2 the address of the particular vendor must be dispalyed in certain textboxes (and the address of the vendors are present in Table 2)

I have to write an SP for it can anyone help me in providing the logic for it in by giving a sample code

susan

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-12-21 : 11:21:28
For speed , select all the various data your client software requires. Place the data in arrays, and then use something like javascript , to return data when a usr makes a choice.

If you could supply more details , such as Table definitions , then an sp could be produced

Jack Vamvas
--------------------
http://www.ITjobfeed.com
Go to Top of Page

EugeneLim11
Posting Yak Master

167 Posts

Posted - 2008-12-22 : 01:49:27
susan,

If you are using Ajax Control toolkit, you can select 3 store procedures :) Take a look at ASP.NET AJax Control toolkit and look at cascading drop down. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx

If this is what you want to achieve, just copy and paste the code and create 3 store procedures for each connection to the SQL query. :)

Regards,

Eugene

check out my blog at http://www.aquariumlore.blogspot.com
Go to Top of Page
   

- Advertisement -