Results 1 to 3 of 3

Thread: What's wrong with this SQLDataSource Control?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    UK
    Posts
    130

    What's wrong with this SQLDataSource Control?

    I must be a plank, but I keep getting "expected )", "invalid expression term :", "expeced ," etc for line 8 (the sqldatasource line)

    Code:
    <%@ Page Language="c#" MasterPageFile="~/MasterPage.master" CodeFile="~/Default2.aspx.cs" Inherits="Default2" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <asp:GridView ID="GridView1" DataSourceID="SQLDataSource1" AutoGenerateColumns="False" runat="server">
    
    </asp:GridView>
    <asp:SqlDataSource ID="SQLDataSource1" ConnectionString="<%# ConnectionStrings:WroxUnited %>" runat="server" 
    SelectCommand="SELECT * FROM [Fixtures]"></asp:SqlDataSource>
    
    </asp:Content>
    PJ

  2. #2
    Fanatic Member
    Join Date
    Jun 2005
    Posts
    625

    Re: What's wrong with this SQLDataSource Control?

    Post the exact text of the error you get.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: What's wrong with this SQLDataSource Control?

    ConnectionString="<%$ ConnectionStrings: WroxUnited %>"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width