none
Too many characters in literal RRS feed

  • Question

  • Hi,

    I  want to pass value from dynamic action link in mvc to a controller method using javascript.

    here is my code.

    In document.ready() function I have written like below

            

    In document.ready() function I have written like below
     var txtShipID = "<%:Model.ShipID %>";
            var txtShipItems = "<%:Model.ShipItems%>";
            var lstItems = txtShipItems.split(',');
            var table = "";
    for (var ind = 0;ind <  lstItems.length; ind++) {

                var row = $('' +
            '' +
            '' +

                        '' +
     '');
                $('#tblShipping').append(row);
            }
        });

    After running the code I a getting the mentioned error.'

    + lstItems[ind].substring(0, 3) + '' + '<%: Html.ActionLink('+lstItems[ind]+',"ReDirectToDetails", "ECU", new {' + lstItems[ind] +'}) %>' + '' + '<a class="delete" href="#">Delete</a>' + '

    • Moved by CoolDadTx Monday, July 10, 2017 1:47 PM ASP.NET related
    Monday, July 10, 2017 12:10 PM

All replies

  • Hello,

    Have you stepped through this code in the browser developer window or run the project from Visual Studio and debug the C# code?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Monday, July 10, 2017 12:26 PM
  • Hi Payne,

    I ran it through visual studio project ,but i am trying it for the last 2 days and not able to get the solution.

    Please help me in this regard.

    Monday, July 10, 2017 12:34 PM
  • Please post questions related to MVC and web development in the ASP.NET forums.
    Monday, July 10, 2017 1:47 PM