I want to call a Sub Routine from within a Sub Routine but ended up in error: How can I do it correctly.
The Sub which is called is like this :-
===========================
Sub Upload(s As Object, e As EventArgs)
If Not (txtUpload.PostedFile Is Nothing) Then
Dim postedFile As HttpPostedFile = txtUpload.PostedFile
Dim filename As String = Path.GetFileName(postedFile.FileName)
postedFile.SaveAs("C:\Uploadfiles\" & filename)
lblMessage.Text = "Contract File has been uploaded"
End If
End Sub
================
The error I got is like this :
Compiler Error Message: BC30451: Name 'a' is not declared.
Source Error:
Line 143: objConn.open()
Line 144:
Line 145: upload(a,b)
Line 146: objCmd.ExecuteNonQuery()
Line 147: objConn.Close()
===============================
How do I declare it ? How to call the sub with parameters in a sub ?
