dynamic DropDownList custom control
i'm trying to create two custom DropDownLists, DropDownList_Countries
in DropDownList_Countries, i have a
public override void DataBind()
which runs a SQL query, and eventually base.DataBind();
in DropDownList_Cities, i have a similar setup but the SQL query
includes a condition which is from the selection of
"SELECT * FROM tbl_cities WHERE country='" +
DropDownList_Countries.SelectedItem.Value + "';"
what i'm trying to achieve is to display two dropdownlists on a webpage,
DropDownList_Countries has a list of options while DropDownList_Cities
is empty. as soon as something's selected in DropDownList_Countries,
this control does a autopostback and at this point, DropDownList_Cities
should have a list of options derived from the selected country.
however, i can't build this .dll, it says DropDownList_Countries cannot
be found. obviously DropDownList_Countries.SelectedItem.Value is not the
correct way to express the selected value. what shoud i do?
|All times are GMT. The time now is 01:10 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.