Hi @Partha Mandayam,
I think I should know what your problem is. (When you ask a question, it's best to provide an example of a minimal recurring problem so we can help you better)
You need to set the Page.IsPostBack property to load the page in response to a client postback.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
SavetoDB()
End If
End Sub
Public Sub SavetoDB()
If image.HasFile Then
Dim fileName As String = image.PostedFile.FileName
' Display or process the filename as needed
Label1.Text = fileName
End If
End Sub
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.