I trying to browse for an image file and save it to the
server image folder.
in other words , upload the picture.

I tried html and aspx.net code:
html:***************************************
<INPUT id="UpLoadFile" style="Z-INDEX: 140; LEFT: 248px;
WIDTH: 87px; POSITION: absolute; TOP: 538px; HEIGHT: 2px"
type="file" onchange="UpLoadFileImage()" size="1"
runat="server">

asp.net:*** Dim hpfIS As HttpPostedFile
hpfIS = UpLoadFile.PostedFile ' uploadfile is the
id of an intput type 'file' that I have created in html

If hpfIS.ContentLength = Nothing Then
Exit Sub
End If

hpfIS.SaveAs(Server.MapPath("images") & "\" &
Me.txtRecID.Text & ".jpeg")
*********************************

but I have receieved an error.
err :

Object reference not set to an instance of an object.
the object in this case is hpfis

please help

sincerely yours

Mike John