Link to home
Start Free TrialLog in
Avatar of REA_ANDREW
REA_ANDREWFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Strange Error

I have a datasource which I use with a gridview, here is the line

<asp:SqlDataSource ID="sub_table_conn" runat="server" ConnectionString="<%$ ConnectionSrings:textConn %>" SelectCommand="SELECT sub_type_id,sub_type FROM tblsubcategories">
        </asp:SqlDataSource>

No I get this message.  Do I have to register the connection or something,? Thanks in advance Andrew

Here is the error

Parser Error Message: The expression prefix 'ConnectionSrings' was not recognized.  Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration.

Source Error:


Line 12:         <asp:GridView ID="GridView1" runat="server" DataSourceID="sub_table_conn">
Line 13:         </asp:GridView>
Line 14:         <asp:SqlDataSource ID="sub_table_conn" runat="server" SelectCommand="SELECT sub_type_id,sub_type FROM tblsubcategories" ConnectionString="<%$ ConnectionSrings: textConn %>" >
Line 15:         </asp:SqlDataSource>
Line 16:     </div>
 

Source File: /andy/test_area/default.aspx    Line: 14
ASKER CERTIFIED SOLUTION
Avatar of aki4u
aki4u

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of REA_ANDREW

ASKER

A simple "DOH!!!!" KINDA SUMS IT UP..... LOL

Cheers guys

Andrew
It happens to us all ;o)