c# - SqlDataSource Based Dropdown list -


i have created dropdown list fetched filtered data based on status.

but inserted data may have entries not active @ moment. applied datasourceid dropdownlist

<asp:dropdownlist id="ddl_country" runat="server" cssclass="roundddl"                    datasourceid="sds_country"                    datatextfield="descr" datavaluefield="code"> </asp:dropdownlist> 

now on click want change datasourceid per new sds_country_all

ddl_country.datasourceid = "sds_country_all"; ddl_country.datavaluefield = "code"; ddl_country.datatextfield = "descr"; 

i have tried apply databound(); etc.

it continuously giving me error.

you're getting sql error. check select statement sds_country_all


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -