HOW TO CALL A JAVASCRIPT FUNCTION FROM CODE BEHIND

   Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

imgBtnViewAll.Attributes.Add("onclick", "return filesSelected('View');")

End Sub

<asp:ImageButton ID="imgBtnViewAll" runat="server" ImageUrl="~/images/docimages/move3.jpg"
                    AlternateText="Move To" Height="20px"></asp:ImageButton>

HERE WHEN IMAGE BUTTON WILL BE CLICKED THE  filesSelected METHOD PRESENT IN THE JAVA SCRIPT WILL BE CALLED WITH A STRING PARAMETER.