Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
715
Get selected value of combobox using asp.net mvc
posted

Can somebody please provide a working sample of igCombo which shows how we can pass the selected value of the combobox to Asp.Net Mvc controller action.

In Asp.net webforms dropdown it iss as easy as getting the value through id of the control. I need to know how we can do that in asp.net mvc. And i dont want to use Jquery or clientside script to do it. 

If a user selects a value from combo box that value gets passed as a parameter to another action method of the cotroller. Please provide a sample application that would be really helpful. 

Thanks. 

Parents
No Data
Reply
  • 37874
    posted

    Hello,

    The IgniteUI controls are completely client-side. They don't work the same way as ASP.NET WebForms controls. So you will have to add some javascript to post to a controller. You can do this in the SelectionChanged event like this:

        selectionChanged: function(evt, ui){      

            //get the value of the selected item      

            var value = ui.items[0].value;     

            $.post('controller/action/' + value);    

     }

    Let me know if you have any other questions.

     

Children