<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
数据库连接正常么?