1

I'm working on an mvc .net web application. Is there a way to pass 3 parameters to an action link?

4

2 回答 2

3

是的,actionlink 采用 routevalues 对象或字典

@Html.ActionLink("Comment", "NewComment", new { id_diff=somevalue, pseudo=somevalue, contenu=somevalue})
于 2012-08-03T11:34:06.073 回答
1

是的,请看下面的代码

我正在向一个动作发送 3 个参数,这些参数包括

  • int id_diff
  • 字符串伪
  • 字符串连续

    @Html.ActionLink("Text", "ActionName", new { id_diff = 33, pseudo = "bye", contenu = "haha" })
    
于 2012-08-03T11:49:40.303 回答