.NETGURU
Creating a Bound DropDown
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.


Jonathan W. Gravois
-- Copied from [aspngcontrolscs] to [aspngcontrolsvb] by Mitch Denny <Click here to reveal e-mail address> --

-- Moved from [aspngfreeforall] to [aspngcontrolscs] by Mitch Denny <Click here to reveal e-mail address> --

Due to included copywritten material, I need to segment my customer
population according to counties. I have a states table and a related
counties table that contains the county names of all states.

I want to "multi-form" the registration process as follows:

(1) present a dropdown of states.
    (1.1) If user chooses a state that we do not service, he/she is directed to
Apology.aspx and informed of our absence.
    (1.2) If user chooses a state that we do service, he/she is presented with
a dropdown of counties listing only the counties of the state selected in
step 1
    (1.3) If user chooses a county that we do not service, he/she is directed
to Apology.aspx
    (1.4) If user chooses a county that we partially serve, his/her role is set
at Level 3 which can only access certain pages
    (1.5) If user chooses a county that we fully serve, his/her role is set at
Level 4

I'm stuck at step 1 -- figuring out how to display a column in a drop down.
So, can anyone direct me to a VB.Net/ASP.NET resource that can explain this
to me or give me brief instructions on how I can complete this part of my
application.

Your help is greatly appreciated!
Jon

Reply to this message...
 
    
Dennis West
http://aspalliance.com/dotnetsolutions/GetSolution.aspx

Enter DropDownList this will give you some source on how to fill a
dropdownlist

I would dynamically build the counties off of the selection of a state.
You need to consider the number of counties in a state Texas has 600
counties...hmmm
You also should use a fastkey entry like adding this code to scroll the
dropdown to the state and counties by enter the name of the state or county
and consider correallting zip codes to counties

te = tennensee, tex =texas .......da= dallas county

You could use stored procedure to fill the dropdowns

<INPUT type="text" id=searchText size=6 name=searchText
onKeyUp="findText(this, DropDownList1);">
<ASP:DropDownList id="DropDownList1" runat="server"
DataValueField="Category" Width="170"></ASP:DropDownList>

<SCRIPT LANGUAGE="JavaScript">

function findText(finder_textbox, finder_selectbox)
{
var searchStr = finder_textbox.value;

var myExp = new RegExp(("^" + searchStr), "i");
var foundResult = false;
var i=0;

while ((foundResult = false) || (i < 363))
{

if( myExp.test(finder_selectbox.options[i].text))
{
finder_selectbox.options[i].selected = true;
foundResult = true;
}
i++;

}
}

// -->

</SCRIPT>

----- Original Message -----
From: "Jonathan W. Gravois" <Click here to reveal e-mail address>
To: "aspngcontrolsvb" <Click here to reveal e-mail address>
Sent: Monday, March 11, 2002 1:45 PM
Subject: [aspngcontrolsvb] Creating a Bound DropDown

> -- Copied from [aspngcontrolscs] to [aspngcontrolsvb] by Mitch Denny
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.WebControls.DropDownList




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification