J
J-T
Is there a way to detect if a user has refreshed a page in asp.net?
Thanks a lot
Thanks a lot
J-T said: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?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.