How to fill ComboBox in View from controller

Posted on 2011-10-15
Last Modified: 2012-05-12
Actually i am new in mvc3 and not experience in JQuery, I am filling

on client site like

var combobox = $('#ComboBox').data('tComboBox');

var dataSource =
    { Text: "Product 1", Value: "1" },
    { Text: "Product 2", Value: "2" },
    { Text: "Product 3", Value: "3" },
    { Text: "Product 4", Value: "4" },
    { Text: "Product 5", Value: "5" },
    { Text: "Product 6", Value: "6" },
    { Text: "Product 7", Value: "7" },
    { Text: "Product 8", Value: "8" },
    { Text: "Product 9", Value: "9" }


actually i want to pull this data from controller and want to fill in view can you tell me how i will do that, send me code exemple that would be easy for me. Thanks
Question by:farjack1
    1 Comment
    LVL 26

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now