Search:
Namespaces
Discussions
.NET v1.1
Feedback
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
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com