Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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);
}
Posted
Updated 13-Sep-12 19:24pm
v2

1 solution

below solved my problem:
window.location.replace("/AcctConfirmation/Index?acctCode=" + acctCode )

XML
<script type="text/javascript">
    $(document).ready(function () {
        $('#myDataTable tbody tr').dblclick(function () {

            var acctCode = $(this).find('td:eq(0)').html();

            window.location.replace("/AcctConfirmation/Index?acctCode=" + acctCode )


        }).hover(function () {
            $(this).css('background-color', '#ccc');
        }, function () {
            $(this).css('background-color', '#fff');
        });
    });
</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900