在vs.net2003 用vb编写asp.net。
在datagrid里如何实现删除一条记录(完整的代码是怎么样的),并把“删除”放在该控件的最后一列;
如何把一列设置成链接的一列(如单圾该列的具体值,将在另一张网页打开其详细信息),可以写出具体的步骤跟代码吗。
vs.net2003 的datagrid控件功能太强大了本人正在做毕业设计,希望大虾能救小弟一下!感激不尽!!!

解决方案 »

  1.   

    http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/vbcon/html/vbwlkWalkthroughUsingDataGridWebControlToReadWriteData.asp
      

  2.   

    http://www.google.com/url?sa=U&start=2&q=http://dev.csdn.net/article/63/63892.shtm&e=9835
      

  3.   

    http://dev.csdn.net/article/63/63892.shtm
      

  4.   

    if(e.CommandName=="del")
    {
    string title=e.Item.Cells[0].Text.Trim();
    string author=e.Item.Cells[1].Text.Trim();
    if(title==" ")title="%";
    if(author==" ")author="%"; string sql="delete from txtinfo where txtname = '"+title+"' and author = '"+author+"'";
    string sqling="delete from word where filename = '"+title+"'";
    SqlCommand  cmd=new SqlCommand(sql,conn);
    SqlCommand  cmding=new SqlCommand(sqling,conn);
    conn.Open();
    try
    {
    cmd.ExecuteScalar();
    cmding.ExecuteScalar();
    conn.Close();
    }
    catch 
    { Response.Write("<script language=javascript>alert('试图删除记录时发生错误!请检查');</script>");
    }
    conn.Close();
    grid_bind(); }
    if(e.CommandName=="browse")
    {
    string pre1=e.Item.Cells[0].Text.Trim();
    string pre2=e.Item.Cells[1].Text.Trim();
    Response.Redirect("detail.aspx?title="+pre1+"&author="+pre2+"");
    }