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
1145
igCombo giving text, not value in form submission
posted
I have the following html:
<script type="text/javascript">
 
    var data = [ { 'Label''Label1''Value''100'} , { 'Label''Label2''Value''200'} ] ;
 
    $(document).ready(function () {
 
        $("#combo").igCombo({
            dataSource: data,
            textKey: "Label",
            valueKey: "Value",
            width: "200px",
            multiselect: false,
            mode: "dropdown"
        });
    });
 
</script>
 
@using (Html.BeginForm("Submit""Home"new { @id="queuereportform" }, FormMethod.Post))
{
    <input id="combo" name="combo" /><br />
    <input type="submit" name="submit" value="Submit" />
}
My controller has this method:
        [HttpPost]
        public void Submit(FormCollection fc)
        {
            System.Diagnostics.Debug.WriteLine(fc["combo"]);
        }

fc["combo"] is either 'Label1' or 'Label2'

Obviously I'd like it to be '100' or '200'
What am I doing wrong?