提示字符串输入的格式不正确?asp.net
protected void GV_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int id = int.Parse(GV.Rows[e.RowIndex].Cells[0].Text);
if (infoBll.getinfobll().DeleteID(tm))
{
Response.Write("<script>alert('删除成功!')</script>");
GV.DataSource = infoBll.getinfobll().SelectName();
GV.DataBind();
}
}
<div>
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="False" OnRowDataBound="GV_RowDataBound" OnRowDeleting="GV_RowDeleting"
>
<Columns>
<asp:BoundField DataField="TaskID" HeaderText="任务编号" Visible="false" />
<asp:CommandField EditText="删除" HeaderText="操作" ShowDeleteButton="True" />
</Columns>
</asp:GridView>
如果我把Visible=“false”给删了,程序就能正常运行,但是要求ID是隐藏的,所以这个问题不清楚该如何解决,求大佬指点!