mohit gupta

mohit gupta

  • NA
  • 145
  • 59.4k

The connection name 'ECN' was not found in the applications

Oct 18 2013 4:36 AM
The connection name 'name' was not found in the applications configuration or the connection string is empty..my code is..
<asp:GridView runat="server" ID="gvdetails" DataSourceID="dsdetails" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false">
<RowStyle BackColor="#EFF3FB" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="UserId" HeaderText="UserId" />
<asp:BoundField DataField="UserName" HeaderText="UserName" />
<asp:BoundField DataField="password" HeaderText="password" />
<asp:BoundField DataField="Email" HeaderText="Email" />
<asp:BoundField DataField="Department" HeaderText="Department" />

</Columns>
</asp:GridView>
</td>
</tr>
</table>
<asp:SqlDataSource ID="dsdetails" runat="server" ConnectionString="<%$ConnectionStrings:ECN %>" ProviderName="<%$ ConnectionStrings:ECN.ProviderName %>"
SelectCommand="select * from UserMaster"/>
</div>

Answers (5)