I have a form :
<form id="frmUpload" name="UploadFileFromClientForm" method="post"
encType="multipart/form-data" runat="server"> .....
<INPUT id="UploadTheFile" type="button" value="Upload"
name="UploadTheFile" runat="server"> ......
</form>
and here is the code behind it:
private void UploadTheFile_ServerClick(object sender,
System.EventArgs e)
{
HttpPostedFile file = File1.PostedFile;
byte[] fileData = new byte[file.ContentLength];
file.InputStream.Read(fileData, 0, file.ContentLength);
uploader.FileName=Path.GetFileName(file.FileName);
uploader.Upload();
}
whenever the user refreshes the page UploadTheFile_ServerClick is
being called and another record with the same information is being
inserted into my database.
Any,suggestions?