aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies Clear Fileupload Control using JavaScript

Dec 5, 2012

Here I will explain how to clear file upload control in using JavaScript.


To Clear file upload control in JavaScript we need to write the following code your page

<html xmlns="">
<head id="Head1">
<title>validate fileupload control using jquery</title>
<script language="javascript" type="text/javascript">
function ClearFileUploadControl() {
var uplctrl = document.getElementById("fileupload1");;
clrctrl = uplctrl.createTextRange();
<form id="form1" runat="server">
<td><b>Upload Images:</b></td>
<td><asp:FileUpload ID="fileupload1" runat="server" /></td>
<tr><td></td><td><asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClientClick="ClearFileUploadControl()" /></td></tr>

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...

Where is output ?

Anonymous said...


Anonymous said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.