Instead of populating the Items Collection of a DropDownList, I coded my HTML page like this:[ul]<asp:dropdownlist id=ddlMailState runat="server">
<!--#include file="includes/states.inc"-->
</asp:dropdownlist>[/ul]where the include file looked like this:[ul]<asp:ListItem>AL</asp:ListItem>
<asp:ListItem>AK</asp:ListItem>
<asp:ListItem>AZ</asp:ListItem>
and so on.[/ul]When I run the application, the dropdownlist works as expected, but in design view, I get an "Error Creating Control" message on my control and can no longer access its properties. When I hover over the control, the error message reads, "Parser Error: Value cannot be null. Parameter name: path1."
Does anyone know of a way to use an include file as a source for the Items Collection without getting this error? I don't want to put the State codes in a database and bind the control to the DataSource as there's no need to make a trip to the database for something as simple as this.
Thanks.
<!--#include file="includes/states.inc"-->
</asp:dropdownlist>[/ul]where the include file looked like this:[ul]<asp:ListItem>AL</asp:ListItem>
<asp:ListItem>AK</asp:ListItem>
<asp:ListItem>AZ</asp:ListItem>
and so on.[/ul]When I run the application, the dropdownlist works as expected, but in design view, I get an "Error Creating Control" message on my control and can no longer access its properties. When I hover over the control, the error message reads, "Parser Error: Value cannot be null. Parameter name: path1."
Does anyone know of a way to use an include file as a source for the Items Collection without getting this error? I don't want to put the State codes in a database and bind the control to the DataSource as there's no need to make a trip to the database for something as simple as this.
Thanks.