RSS

Clearing ASP.Net FileUpload Control in Javascript

25 Nov

The following script will help you to clear the control……

<script language=”javascript”>

    function ClearfuBannerImage()

    {

    var fil = document.getElementById(“fuBannerImage”);

   fil.select();

   n=fil.createTextRange();

   n.execCommand(‘delete’);

   fil.focus();

    }

    </script>

 

<asp:FileUpload ID=”fuBannerImage” runat=”server” />

<asp:Button ID=”btnReset” runat=”server” OnClientClick=”ClearfuBannerImage()” Text=”Reset” />

 

 

Advertisements
 
Leave a comment

Posted by on November 25, 2012 in ASP Dot Net C#, Java Script

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: