当前位置:编程学习 > C#/ASP.NET >>

.net 问题

DataBinding:“System.Data.DataRowView”不包含名为“工作量”的属性。 --------------------编程问答-------------------- 这是什么原因啊,按照网上一些解决方法,试过了,可是总也解决不了
--------------------编程问答-------------------- 跪求高人相助啊! --------------------编程问答-------------------- 没有取到这个字段吧。 --------------------编程问答-------------------- 没有代码,没有易做图。 --------------------编程问答--------------------
引用 1 楼  的回复:
这是什么原因啊,按照网上一些解决方法,试过了,可是总也解决不了

原因异常都写明了就是你要绑定的那个数据里面没有工作量这个属性,LZ你最好贴下代码否则不知道是具体什么问题....... --------------------编程问答-------------------- 多数情况是没有取到那个字段数据或没找到有关字段~ --------------------编程问答--------------------

                                                                <tr>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        月生产计划编号:
                                                                    </td>
                                                                    <td width="20%" align="left">
                                                                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("月生产计划编号") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        计划编号:
                                                                    </td>
                                                                    <td align="left">
                                                                        <asp:Label ID="Label2" runat="server" Text='<%#Eval("计划编号") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                </tr>
                                                          
                                                                <tr>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        区域位置:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="Label13" runat="server" Text='<%#Eval("区域位置") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                    <td align="right" width="15%" bgcolor="#AECAF0">
                                                                        采量:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="Label3" runat="server" Text='<%#Eval("采量") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                           
                                                                </tr>
                                                                <tr>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        计算依据:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="Label16" runat="server" Text='<%#Eval("计算依据") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                </tr>  
                                                            </table>
                                                        </dxw:ContentControl>
                                                    </ContentCollection>
                                                </dxtc:TabPage>
                                                <dxtc:TabPage Text="掘进指标分解">
                                                    <ContentCollection>
                                                        <dxw:ContentControl ID="ContentControl2" runat="server">
                                                            <table width="100%" class="tableCss" border="1px" bordercolor="#AECAF0">
                                                                <tr>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        月生产计划编号:
                                                                    </td>
                                                                    <td width="20%" align="left">
                                                                        <asp:Label ID="Label5" runat="server" Text='<%#Eval("月生产计划编号") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        计划编号:
                                                                    </td>
                                                                    <td width="20%" align="left">
                                                                        <asp:Label ID="Label4" runat="server" Text='<%#Eval("计划编号") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        区域位置:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="Label7" runat="server" Text='<%#Eval("区域位置") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                    <td width="15%" align="right" bgcolor="#AECAF0">
                                                                        工作量:
                                                                    </td>
                                                                    <td width="20%" align="left">
                                                                        <asp:Label ID="Label17" runat="server" Text='<%#Eval("工作量") %>' CssClass="txt_left"></asp:Label>
                                                                         
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" width="15%" bgcolor="#AECAF0">
                                                                        计算依据:
                                                                    </td>
                                                                    <td>
--------------------编程问答-------------------- <%#Eval("工作量") %> 这个前提是你的数据中有这个字段。看看是否取到这个数据? --------------------编程问答-------------------- 查询出来的字段里面 ,没有 “工作量”这个字段!
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,