que tal raza ya pude conesto no de la forma que queria pero lo solucione
aqui esta
primero el gridview
Código ASP:
Ver original<asp:GridView ID="GridView1" runat="server" CssClass="gridview"
onselectedindexchanged="GridView1_SelectedIndexChanged"
AutoGenerateColumns="False"
DataKeyNames="Nombre" SelectedIndex="0" autogenerateselectbutton="false" >
<Columns>
<asp:BoundField DataField="Nombre" HeaderText="Nombre"/>
<asp:BoundField DataField="PESO" HeaderText="PESO"/>
<asp:BoundField DataField="Ultima modificacion" HeaderText="Ultima modificacion"/>
<asp:TemplateField HeaderText="Descargar">
<ItemTemplate>
<img alt="" src="imagenesoplat/descargar.png" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
codigo
Código ASP:
Ver originalImports System.IO
Imports System.Web.UI.WebControls
Imports System.Web.UI
Imports System.Web.UI.WebControls.GridViewRowEventArgs
Imports System.Object
Imports System.Web.UI.Control
Imports System.Web.UI.WebControls.Image
Imports System.Web.UI.WebControls.ImageButton
Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents Button1 As System.Web.UI.WebControls.ImageButton
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub cargar()
For Each fichero As String In System.IO.Directory.GetDirectories(Server.MapPath("directorio"))
ddl_carpetas.Items.Add(fichero.Substring(fichero.LastIndexOf("\") + 1))
Next
End Sub
Private Sub archivos(ByVal navegar As String)
Dim dirInfo As New DirectoryInfo(Server.MapPath(navegar))
Dim listado As System.IO.FileInfo() = dirInfo.GetFiles("*.*")
Dim tabla As New Data.DataTable
tabla.Columns.Add("Nombre")
tabla.Columns.Add("Ultima modificacion")
tabla.Columns.Add("PESO")
For i As Integer = 0 To listado.Length - 1
tabla.Rows.Add(listado(i).Name, listado(i).LastWriteTime, listado(i).Length / 1024 & " KB")
Next
GridView1.DataSource = tabla
GridView1.DataBind()
End Sub
Protected Sub carpetas_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddl_carpetas.SelectedIndexChanged
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles boton_abrir.Click
Dim dira As String
dira = ddl_carpetas.SelectedItem.ToString
Call archivos("directorio/" & dira)
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles boton_cargar.Click
Call cargar()
boton_cargar.Visible = False
boton_abrir.Visible = True
lbl_texto.Visible = True
ddl_carpetas.Visible = True
boton_recargar.Visible = True
End Sub
Protected Sub boton_recargar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles boton_recargar.Click
Response.Redirect("")
End Sub
Private Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';")
e.Row.Attributes.Add("onmouseout", "this.style.textDecoration='none';")
e.Row.Attributes.Add("onclick", ClientScript.GetPostBackClientHyperlink(Me.GridView1, "Select$" + e.Row.RowIndex.ToString()))
End If
End Sub
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
Dim strRuta As String
strRuta = "directorio/" & ddl_carpetas.SelectedItem.ToString & "/" & GridView1.Rows(GridView1.SelectedIndex).Cells(0).Text
Response.Redirect(strRuta)
End Sub
End Class
soludos a todos los que vieron mi problema pero ningumo me respondio
talvez a alguien le sirva