How to add the DeleteCommand in aspx.vb file?

Discussion in 'ASP .Net' started by Guest, May 24, 2006.

  1. Guest

    Guest Guest

    Hi,

    How to add the DeleteCommand="delete from table where ..."
    related to a gridview in VB.Net, because i have no tag <asp:SqlDataSource >?

    This is the content of file grid.asp:
    ------------------------------------
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>

    This is the code in grid.aspx.vb:
    --------------------------------
    .....(dim ...)
    oConnection = New OleDbConnection()
    sql = "SELECT ..."
    sConnectionString = "Provider = ..."
    sda = New OleDbDataAdapter(sql, sConnectionString)
    dt = New DataSet()
    sda.Fill(dt)
    GridView1.DataSource = dt
    GridView1.DataBind()

    Thanks
    Guest, May 24, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Afonin
    Replies:
    2
    Views:
    444
    Peter Afonin
    Nov 19, 2003
  2. XueWu
    Replies:
    0
    Views:
    608
    XueWu
    Jul 12, 2005
  3. Nathan Sokalski
    Replies:
    4
    Views:
    3,508
    Nathan Sokalski
    May 21, 2006
  4. Averell
    Replies:
    15
    Views:
    15,605
    Dharmesh Surti
    Aug 23, 2006
  5. Averell

    how to add a warning to DeleteCommand of gridview?

    Averell, May 29, 2006, in forum: ASP .Net Web Controls
    Replies:
    14
    Views:
    327
    Edwin Knoppert
    Jun 1, 2006
Loading...

Share This Page