Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html.ActionLink将在代码的不同部分发生_Html_Asp.net - Fatal编程技术网

Html.ActionLink将在代码的不同部分发生

Html.ActionLink将在代码的不同部分发生,html,asp.net,Html,Asp.net,我正在尝试制作ActionLink,它将在代码的另一部分中出现,例如: <div class="col-md-4"> @Html.ActionLink(some button to click and perform "Action" div) </div> <div id="Action> <div class="col-md-12">

我正在尝试制作ActionLink,它将在代码的另一部分中出现,例如:

  <div class="col-md-4">
                @Html.ActionLink(some button to click and perform "Action"   div)
            </div>

  <div id="Action>
      <div class="col-md-12">
                @Html.Action(some action to be done)
      </div>
  </div>

@ActionLink(单击并执行“Action”div的一些按钮)
这应该行得通

<div class="col-md-4">
     <a href="@Url.Action("TestAction", "Test", new {parameterName= "parameterValue"})">
</div> 

试着这样做:

@Html.ActionLink("Edit", "Edit", new { id = item.EmployeeID })
操作如下所示:

public ActionResult Edit(int id)
{
//action code

}

-ActionLink将只生成指向另一个页面的链接
public ActionResult Edit(int id)
{
//action code

}