Click here to Skip to main content
15,885,546 members

populate fields from popup

Revision 1
Hi guys,

I need your idea again.. i have this on my cshtml @Html.TextBoxFor(model => model.AccountCode). in the first run with public ActionResult Index() it will populate the a data.. but in the second run if i re-assign a new value, no effects happen. please look below code:

C#
public ActionResult Index()
{
    AcctConfirmationInput tests = new AcctConfirmationInput();
    string test = "sample";
    tests.AccountCode = test.Trim();

    LoadBranch();
    return View(tests);
}

[HttpPost]
public ActionResult Index(string test)
{
    AcctConfirmationInput tests = new AcctConfirmationInput();
    tests.AccountCode = test.Trim() + "";
    LoadBranch();
    //return View(tests);
    return View(tests);
}
Posted 13-Sep-12 19:20pm by naijeru.
Tags: , , ,