Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/10/2010, 10:54
pipeman2009
 
Fecha de Ingreso: septiembre-2010
Mensajes: 27
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Ayuda con gridView y textbox

ya lo logre porfin jajaja....
ahora a pasar de base de gridview a una base de datos

Código:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            table = New System.Data.DataTable()
            table.Columns.Add("id_padre", GetType(System.String))
            table.Columns.Add("nombre_p", GetType(System.String))
            'table.Columns.Add("edad_p", GetType(System.String))
            'table.Columns.Add("ocupacion", GetType(System.String))
            Session.Add("Tabla", table)

        End If
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        table = (Session("Tabla"))
        row = table.NewRow()
        row("id_padre") = TextBox1.Text
        row("nombre_p") = TextBox2.Text
        'row("edad_p") = TextBox3.Text
        'row("ocupacion") = TextBox4.Text
        table.Rows.Add(row)
        GridView1.DataSource = table
        GridView1.DataBind()
        Session.Add("Tabla", table)
    End Sub
e ai la respuesta por si alguien la necesita
gracias a los que me aportaron