Home error when using <%#Eval("")%> asp.net
Reply: 1

error when using <%#Eval("")%> asp.net

Rehmak Natiq
Rehmak Natiq Published in 2017-12-02 04:55:29Z


I get Error usign <%#Eval("ComlainnID")%>

I got error on every line which have <%#Eval%>

My GridView code is this

      <asp:GridView CssClass="tbl" runat="server" AutoGenerateColumns="False" DataKeyNames="ComplainID" 
      DataSourceID="SqlDataSource1" ItemType="q" CellPadding="4" ForeColor="#333333" ID="gv" style="direction: ltr"
       OnPageIndexChanging="gv_PageIndexChanging" AllowPaging="True" EmptyDataText="No Complain Found" 
        BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" PageSize="25" 
      OnDataBinding="gv_DataBinding" OnRowDataBound ="gv_DataBound" AllowSorting="True" OnRowEditing="gv_RowEditing"

        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />

            <asp:ImageField  HeaderStyle-CssClass="border" HeaderText="Photo"  DataImageUrlField="ImagePath" ItemStyle-Height="50px" ItemStyle-Width="50px">
                <ItemStyle  CssClass="border"  Height="50px" Width="50px">

             <asp:CommandField ButtonType="Button" EditText="Reply" ShowEditButton="True" 
                 HeaderStyle-CssClass="border" ItemStyle-CssClass="border" >


                    <asp:Label Text='<%#Eval("ComplainID")%>' ID="Label1" runat="server"></asp:Label>



The Error is on line

             <asp:Label Text='<%#Eval("ComplainID")%>' ID="Label1" runat="server"></asp:Label>

The Error is :

        Error   CS0246  The type or namespace name 'q' could not be found (are you missing a using directive or an assembly reference?)     

This is web application in .NET Framework 4.6

Sea Charp
Sea Charp Reply to 2017-12-05 14:31:22Z

You should probably remove this from your gridview properties:

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.316138 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO