I am trying to display all these three helpers in same line.
Popup is also not showing up asking for conformation on button click.
But the button is displayed in next line which I am creating using @using:
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.EmployeeId }) |
@Html.ActionLink("Details", "Details", new { id = item.EmployeeId }) |
@using (Html.BeginForm("Delete", "BusinessLayer", new { id = item.EmployeeId }))
{
<input type="submit" value="Delete" onclick="return conform('Are you sure you want to delete record with EmployeeId = @item.EmployeeId')" />
}
</td>
Is there any way I can display it in same line.
Rightly Pointed that this is question is related to CSS.Since the Entire CSS is not available i'm using inline style here.
<td style="width:100%;">
@Html.ActionLink("Edit", "Edit", new { id = item.EmployeeId,@style="width:33.33%" })
@Html.ActionLink("Details", "Details", new { id = item.EmployeeId,@style="width:33.33%"})
@using (Html.BeginForm("Delete", "BusinessLayer", new { id = item.EmployeeId,@style="width:33.33%"}))
{
<input type="submit" value="Delete" onclick="return conform('Are you sure you want to delete record with EmployeeId = @item.EmployeeId')" />
}
</td>
But i strongly recommend to use CSS instead of inline style.