Hi ,I have problem about asp.net file listing

-3
Public Class Profil
    Inherits System.Web.UI.Page
    Dim yol As New DirectoryInfo(Server.MapPath("~/KullaniciLoad/Gonderi/Lokal/Gonderi/" & Label1.Text & "/"))
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ''Dosya yolu ve adı
        On Error Resume Next
        If Not Label1.Text = "" Then
            Me.ListBox1.Items.Clear()
            Label1.Text = Session("adi").ToString()
            For Each liste In yol.GetFiles(".html")
                Me.ListBox1.Items.Add(liste.Name)
                Exit For
            Next
        End If
    End Sub

    Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Panel3.Visible = False
        Panel2.Visible = True
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Panel3.Visible = True
        Panel2.Visible = False
    End Sub

    Protected Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged

    End Sub
End Class

System.NullReferenceException HResult=0x80004003 İleti=Nesne başvurusu bir nesnenin örneğine ayarlanmadı. Kaynak=WebApplication3 StackTrace: konum WebApplication3.Profil..ctor() D:\world\BELGELER\Visual Studio 2017\Projects\WebApplication3\WebApplication3\KullaniciLoad\Profil.aspx.vb içinde: 6. satır konum ASP.kullaniciload_profil_aspx..ctor() konum __ASP.FastObjectFactory_app_web_1sjuftvy.Create_ASP_kullaniciload_profil_aspx()

This is my error code, and the code I wrote is down. I'm having trouble listing the file. HELP ME...

asp.net
vb.net
asked on Stack Overflow Jul 29, 2019 by Enes Özmert • edited Jul 29, 2019 by Enes Özmert

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0