Clearing File Upload Control with the help of Javascript.

Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 179
Sometimes,it's needed to clear Fileupload control,so that it would not be uploaded again and again.So,we can do this with Javascript function as shown below:-

<script language = "javascript">
function Clear_FileUpload()
var flu_pd = document.getElementById("fle_upd_documents");;
var val = flu_pd.createTextRange();
<asp:FileUpload ID = "fle_upd_documents" runat = "server" />
<asp:Button ID = "btn_upload" runat = "server" OnClientClick = "Clear_FileUpload()" Text = "Upload" />

Comments or Responses

Login to post response