1
Vote

how do you display data in the View from the controller

description

Here is my methods in the controller:

public void GetMega_Million()
    {
        object a = GenerateMegaMillions.Mega_Million1(0);
        object b = GenerateMegaMillions.Mega_Million2(0);
        object c = GenerateMegaMillions.Mega_Million3(0);
        object d = GenerateMegaMillions.Mega_Million4(0);
        object f = GenerateMegaMillions.Mega_Million5(0);
        object g = GenerateMegaMillions.Mega_Million6(0);
    }

    public ActionResult MegaMillion()
    {
        GetMega_Million();
        return View();
    }
Please understand GenerateMegaMillions is a public static class and all of the methods in the class are public static. What I need to do is display the data in input textboxes in the View().
<form> <div id="megaLabel"> <label for="MegaMillions">MegaMillions: </label> <input type="text" name="Mega" id="MegaMillions" readonly="readonly" /> <input type="text" name="Mega1" id="MegaMillions1" readonly="readonly" /> <input type="text" name="Mega2" id="MegaMillions2" readonly="readonly" /> <input type="text" name="Mega3" id="MegaMillions3" readonly="readonly" /> <input type="text" name="Mega4" id="MegaMillions4" readonly="readonly" /> <input type="text" name="Mega5" id="MegaMillions5" readonly="readonly" /> <input type="text" name="Mega6" id="MegaBall" readonly="readonly" /> </div> @*<div id="mytext"> @Html.TextBox( </div>*@ </form> one number for each textbox example, how do I that in the view?

comments