Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
C#
I wrote the code like this:

var dependentid;
$(document).ready(function () {
        var empNo = "<%=empNo%>";
        $("#file_upload").uploadify({
           uploader: uploadify.swf,
            cancelImg: ../../images/cancel.png,
            buttonText: Browse&,
           uploader: ../../handlers/Upload.ashx,
            formData: { dependentid: $(#hrForms_phContent_txtDependentid).val() },
            folder: uploads,
            fileDesc: Image Files,
            fileExt: *.jpg;*.jpeg;*.gif;*.png,
            multi: true,
            auto: false,
            debug: false
        });

    });
Here dependentid is going NULL or Empty in handler class.
Handler.ashx code:

C#
empNo = context.Request["empNo"];
            dependentid = context.Request["dependentid"];

Plz help me how to pass values from Uploadify() method to handler class

thanks
</pre>
Posted
Updated 10-Oct-15 21:43pm
v2
Comments
Kornfeld Eliyahu Peter 11-Oct-15 4:14am    
Debug the client side and check what '$(#hrForms_phContent_txtDependentid).val()' actually returns...
Member 11570261 11-Oct-15 4:42am    
null value going to handler class
Kornfeld Eliyahu Peter 11-Oct-15 5:26am    
It was a reply intended to me?
Member 11570261 11-Oct-15 6:31am    
yes
Kornfeld Eliyahu Peter 11-Oct-15 6:43am    
So you say that '$(#hrForms_phContent_txtDependentid).val()' returns a null value even on the client - and?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900