erum 0 Junior Poster in Training

can any one help me how to pass model object from view to controller using ajax .i have below code but not working.i am getting null in EmpAddType .even i selected any thing from drop downlist

<script>  

    function GetFilter() {  

        var employeeAddress = {  
            "EmpAddType": $("#drop1 option:selected").text()  

        }  

        alert($("#drop1 option:selected").text());  
        alert(employeeAddress.EmpAddType);  

        $.ajax({  
            url: '@Url.Action("SaveAddress")',  
            type: 'POST',  
            cache: false,  
            contentType: 'application/json',  
            dataType: "json",  

            data: JSON.stringify(employeeAddress),  
            success: function (data) {  
                alert("You Multiple Data Passed Successfully");  
            },  

            error: function () {  
                alert("failed");  
            }  
        });  

    }  
    function showDiv() {  

        $('#MailingContactDetails').show(1000)  
    }  
    function showDiv2() {  

        $('#AccountDetail').show(1000)  
    }  

</script>  
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.