Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/10/2003, 11:09
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años, 1 mes
Puntos: 50
Cita:
O si se puede ocultar el DataGrid (por propiedades)
Nol lo he probado pero se me ocurre de esta forma:

Cita:
Dim oView As New DataView(objDataset.Tables(0))
' Set up the data grid and bind the data.
DataGrid1.DataSource = oView
DataGrid1.DataBind()
Datagrid1.Visible = False

Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False

Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)

DataGrid1.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
Saludos