ajay raju

ajay raju

  • NA
  • 398
  • 0

how to pass control from javascript to codebehind in asp.net

Jan 7 2013 9:11 AM

Hi
below is my code

i am taking one fileupload control i.e.,
<asp:FileUpload ID="FileUpload1" runat="server" onchange="Showpath(this)" />
and my javascript code is:
function Showpath(e) {
         var file;
         file = e;
         PageMethods.SaveImage("how to pass fileupload control here");        
         }

in my .vb page i write one function i.e.,
<System.Web.Services.WebMethod()> _
    Public Shared Function SaveImage(ByVal fUpload As fileupload) As String

    Return ""
    End Function

i want to pass the fileupload1 control in this method "
PageMethods.SaveImage".. 
how can i do it? 

Thanks
K.Ajay