• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1009
  • Last Modified:

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
0
REA_ANDREW
Asked:
REA_ANDREW
  • 2
2 Solutions
 
aki4uCommented:
'ConnectionSrings' needs to be: 'ConnectionStrings'
0
 
Carl TawnSystems and Integration DeveloperCommented:
Looks like a simple typo. You have "ConnectionSrigns" rather than "ConnectionStrings", note the "t" in Strings.
0
 
REA_ANDREWAuthor Commented:
A simple "DOH!!!!" KINDA SUMS IT UP..... LOL

Cheers guys

Andrew
0
 
Carl TawnSystems and Integration DeveloperCommented:
It happens to us all ;o)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now