G
Gaetan
on a test web page, I have two DropDownList fields. The data source for the second DDL field depends
on the value selected in the first DDL.
I want a Reset button that will re-initialize the DDL fields to their initial values. My problem is
that the second DDL cannot be re-initialized to a null/empty state. I do not want to see any data in
thesecond DDL field.
The following code worked in .Net 1.1
ddlField2.DataSource = string.empty;
ddlfield2.DataBind();
ddlFields2.SelectedIndex = 0;
However in .Net 2.0, that same code generates an ArgumentOutofRange expeption the second time the
above code is executed.
Is it possible to unbind a DDL field and have ASP.Net to clear the field on the web page?
Regards,
Gaetan
on the value selected in the first DDL.
I want a Reset button that will re-initialize the DDL fields to their initial values. My problem is
that the second DDL cannot be re-initialized to a null/empty state. I do not want to see any data in
thesecond DDL field.
The following code worked in .Net 1.1
ddlField2.DataSource = string.empty;
ddlfield2.DataBind();
ddlFields2.SelectedIndex = 0;
However in .Net 2.0, that same code generates an ArgumentOutofRange expeption the second time the
above code is executed.
Is it possible to unbind a DDL field and have ASP.Net to clear the field on the web page?
Regards,
Gaetan