Muchas gracias!!!
Me ha servido muchísimo. Y guiándome de lo que me has mandado la he echo asi!
Código vb.net:
Ver originalWith mysql_comando
reader = .ExecuteReader()
While reader.Read()
objRow = New TableRow()
Dim objCell1, objCell2, objCell3, objCell4 As New TableCell()
Dim linkDetalle, linkMes As String
Dim sw1 As StringWriter = New StringWriter
Dim ht1 As HtmlTextWriter = New HtmlTextWriter(sw1)
Dim sw2 As StringWriter = New StringWriter
Dim ht2 As HtmlTextWriter = New HtmlTextWriter(sw2)
'Dim link As HtmlTextWriter
numoperario = reader.GetValue(0)
nombre = reader.GetValue(1)
objCell1.Controls.Add(New LiteralControl(numoperario))
objCell1.HorizontalAlign = HorizontalAlign.Center
objCell2.Controls.Add(New LiteralControl(nombre))
objCell2.HorizontalAlign = HorizontalAlign.Left
' Create the a.
ht1.AddAttribute(HtmlTextWriterAttribute.Href, "HorasOperarios.aspx?numOperario=" & numoperario)
ht1.RenderBeginTag(HtmlTextWriterTag.A)
ht1.Write("Detalle mensual")
' End all the tags.
ht1.RenderEndTag()
linkDetalle = sw1.ToString()
objCell3.Controls.Add(New LiteralControl(linkDetalle))
' Create the a.
ht2.AddAttribute(HtmlTextWriterAttribute.Href, "HorasOperariosMes.aspx?numOperario=" & numoperario)
ht2.RenderBeginTag(HtmlTextWriterTag.A)
ht2.Write("Mes entero")
' End all the tags.
ht2.RenderEndTag()
linkMes = sw2.ToString()
objCell4.Controls.Add(New LiteralControl(linkMes))
objRow.Cells.Add(objCell1)
objRow.Cells.Add(objCell2)
objRow.Cells.Add(objCell3)
objRow.Cells.Add(objCell4)
Table2.Rows.Add(objRow)
End While
.Dispose()
End With
Gracias por todo, has sido de gran ayuda.