0

I am using ajax jquery for return a string , i have a entangle , it is Concatenate string I want concatenate :

string str = "";
str += "<td>"+"<%= Html.ActionLink('Edit', 'ProcessUpdate/' + s.ProductId, 'Stationery')%>"+" </td>";

but when i run application , this is result :

I want to run the program the following results

Edit

thank for all !

Nobita
  • 1

1 Answers1

0

It looks your issue is the parameters you are passing to Html.ActionLink(). Your question has been answered here. The "/" character in your second parameter is not valid since this parameter is the action name in MVC2+ or the controller name in MVC1.

Assuming Stationery is the controller and ProcessUpdate is the action on the controller, your code should look like this:

Html.ActionLink("Edit", "ProcessUpdate", "Stationery" new { Id = s.ProductId }, new { } )

And here is the signature for the action

public ActionResult ProcessUpdate(string id)
{
    // Do something
}

Note the last parameter is for Html Attributes and is required for this overload of Html.ActionLink() to work properly.

Community
  • 1
  • 1
tehrustine
  • 46
  • 5