我收到此错误
对象引用未设置为对象的实例
在这一行。
this.ddlUtilityName.DataSource = PurLogicEntities.BLL.Rates.SelectAllUtilityType();
in aspx page the following control.
<asp:DropDownList ID="ddlUtilityName" AppendDataBoundItems="true" runat="server" class="form-control">
<asp:ListItem Text="Please Select" Value="0" />
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlUtilityName"ErrorMessage="Utility Type is required." Display="Dynamic" InitialValue="0"></asp:RequiredFieldValidator>