i've read many articles and discussions through google, i have followed and corrected all yet still nothing happens.

they say that it does not appear if it has no data to display, yet it does have data. i also set AutoGenerateColumns of gridview to true

i was using linqdatasource connected to my gridview, what could be the reason why it wont show when i run it?

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="True" DataKeyNames="perID" DataSourceID="LinqDataSource1" 
            style="margin-top: 15px">
            <Columns>
                <asp:BoundField DataField="perID" HeaderText="perID" ReadOnly="True" 
                    SortExpression="perID" />
                <asp:BoundField DataField="firstName" HeaderText="firstName" 
                    SortExpression="firstName" />
                <asp:BoundField DataField="lastName" HeaderText="lastName" 
                    SortExpression="lastName" />
                <asp:BoundField DataField="age" HeaderText="age" SortExpression="age" />
                <asp:BoundField DataField="contactNo" HeaderText="contactNo" 
                    SortExpression="contactNo" />
                <asp:BoundField DataField="address" HeaderText="address" 
                    SortExpression="address" />
                <asp:BoundField DataField="emailAdd" HeaderText="emailAdd" 
                    SortExpression="emailAdd" />
                <asp:BoundField DataField="resCheckIN" HeaderText="resCheckIN" 
                    SortExpression="resCheckIN" />
                <asp:BoundField DataField="resCheckOUT" HeaderText="resCheckOUT" 
                    SortExpression="resCheckOUT" />
            </Columns>
        </asp:GridView>
    
    </div>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="YXdataclasesDataContext" EntityTypeName="" 
        TableName="resPersons" Where="resCheckIN == @resCheckIN">
        <WhereParameters>
            <asp:Parameter Name="resCheckIN" Type="String" />
        </WhereParameters>
    </asp:LinqDataSource>

thanks

Not sure what type of parameters you have used. Please re-config the datasource and select suitable parameter. (Session, Form, QueryString, Control etc).

thank you for answering
i had solved it, the database i have created does not have data inside

and also this error may occur when there is a duplicate of the table inside database or it is saved twice thinking that it will just overwrite

we make sure to create table correctly and save it once

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.