Foros del Web » Programando para Internet » ASPX (.net) »

Leer Multiple archivos Planos

Estas en el tema de Leer Multiple archivos Planos en el foro de ASPX (.net) en Foros del Web. Saludos a todos espero alguien me pueda ayudar algo actualmente leo un archivo plano y lo cargo en un gridview por medio del siguiente codigo: ...
  #1 (permalink)  
Antiguo 16/06/2011, 10:05
 
Fecha de Ingreso: diciembre-2003
Mensajes: 595
Antigüedad: 20 años, 4 meses
Puntos: 1
Leer Multiple archivos Planos

Saludos a todos espero alguien me pueda ayudar algo actualmente leo un archivo plano y lo cargo en un gridview por medio del siguiente codigo:

List<string> lista = new List<string>();
DataRow fila;

string ruta;
ruta = @"C:\Archivo\datos1.txt";

StreamReader fic = new StreamReader(ruta);
string linea = null;
linea = fic.ReadLine();
while ((linea != null))
{
lista.Add(linea);
linea = fic.ReadLine();
}

string[] Datos;
for (int i = 0; i <= lista.Count - 1; i++)
{
Datos = lista[i].Split(MyChar2);

fila = tabla.NewRow();
for (int j = 0; j <= Datos.Length - 2; j++)
{
fila[j] = Datos[j].Trim();
}

tabla.Rows.Add(fila);

}
GridView2.DataSource = tabla;
GridView2.DataBind();

pero alguien sabe como poder leer N archivos que tenga en la carpeta Archivos

Etiquetas: planos, aspx
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:29.