Code Bye

助 C#问题 页面取GridView为空 原项目正常 拷贝的这个换到别的机器上就不显示了

 <asp:GridView ID="gv_Thirdgc_all_multiline" runat="server" AutoGenerateColumns="False"
                        EnableModelValidation="True" CssClass="listtable" EnableTheming="false" Width="100%">
                        <Columns>
                            <asp:TemplateField HeaderText="<span id="TitleName">费用科目</span><span id="lbsign0" style="font-weight: 700; color: #FF0000">*</span>">
                                <ItemTemplate>
                                    <input size="7" type="text" id="txtCostSubject_<%# Container.DataItemIndex + 1 %>"
                                        name="txtCostSubject_<%# Container.DataItemIndex + 1 %>" class="txtinput width100 required txtCostSubject"
                                        value="<%#GeFatherNameById(Eval("D_KeMu").ToString())%>-<%#Eval("S_SubjectName") %>"
                                        readonly="readonly">
                                    <img id="img4" src="../../../Images/show.jpg" style="cursor: hand;" onclick="show(5,1,"_<%# Container.DataItemIndex + 1 %>")" />
                                    <input type="hidden" name="txtCostSubjectID_<%# Container.DataItemIndex + 1 %>" id="txtCostSubjectID_<%# Container.DataItemIndex + 
1 %>" value="<%#Eval("D_KeMu") %>" />
                                    <input type="hidden" name="txtYSubjectID_<%# Container.DataItemIndex + 1 %>" id="txtYSubjectID_<%# Container.DataItemIndex + 1 %>"
                                        value="<%#Eval("D_YSKeMu") %>" />
                                    <input type="hidden" name="txtKSubjectID_<%# Container.DataItemIndex + 1 %>" id="txtKSubjectID_<%# Container.DataItemIndex + 1 %>"
                                        value="<%#Eval("D_KJKeMu") %>" />
                                    <input type="hidden" name="num" value="<%#Container.DataItemIndex+1%>" />
                                </ItemTemplate>
                            </asp:TemplateField></Columns>
                    </asp:GridView>

这是一小部分代码 本人截了一列 

解决方案

20

数据库连接正常么?

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明助 C#问题 页面取GridView为空 原项目正常 拷贝的这个换到别的机器上就不显示了