W
Wilson Morato
Guest
I'm studing Asp.Net core web Application.
I created a CRUD website ok.
In the site I want create an link to url external e.g. www.google.com
Here, the link is created this way.
```
https://localhost:44311/pVagaDivulgar/details/www.google.com
expected: www.google.com
<a href=@ViewBag.link target="_blank" class="nav-link">Curso</a>
<a href=@item.VagadivulgarCurso1Navigation.CursoLink class="nav-link">Go</a>
```
I dont know if I have to set some properties to works.
```
@model SiteJob1.ViewModel.pVagaDivulgar.IndexViewModel
@{
ViewData["Title"] = "details";
}
<h1>Jobdetails</h1>
@foreach (var item in Model.VMvagasdivulgar)
{
<h4>@item.VagadivulgarVaga.VagaTitulo</h4>
}
<table class="table">
<thead>
<tr>
<th>ID</th><th>Course</th><th>Link</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.VMvagasdivulgar)
{
<tr>
<td>
@item.VagadivulgarId
</td>
<td>
@item.VagadivulgarCurso1Navigation.CursoNome
</td>
<td>
<a href=@ViewBag.link target="_blank" class="nav-link">Curso</a>
<a href=@item.VagadivulgarCurso1Navigation.CursoLink class="nav-link">Go</a>
</td>
</tr>
}
</tbody>
</table>
<div>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
<a asp-action="Index">Back to List</a>
</div>
```
Continue reading...
I created a CRUD website ok.
In the site I want create an link to url external e.g. www.google.com
Here, the link is created this way.
```
https://localhost:44311/pVagaDivulgar/details/www.google.com
expected: www.google.com
<a href=@ViewBag.link target="_blank" class="nav-link">Curso</a>
<a href=@item.VagadivulgarCurso1Navigation.CursoLink class="nav-link">Go</a>
```
I dont know if I have to set some properties to works.
```
@model SiteJob1.ViewModel.pVagaDivulgar.IndexViewModel
@{
ViewData["Title"] = "details";
}
<h1>Jobdetails</h1>
@foreach (var item in Model.VMvagasdivulgar)
{
<h4>@item.VagadivulgarVaga.VagaTitulo</h4>
}
<table class="table">
<thead>
<tr>
<th>ID</th><th>Course</th><th>Link</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.VMvagasdivulgar)
{
<tr>
<td>
@item.VagadivulgarId
</td>
<td>
@item.VagadivulgarCurso1Navigation.CursoNome
</td>
<td>
<a href=@ViewBag.link target="_blank" class="nav-link">Curso</a>
<a href=@item.VagadivulgarCurso1Navigation.CursoLink class="nav-link">Go</a>
</td>
</tr>
}
</tbody>
</table>
<div>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
<a asp-action="Index">Back to List</a>
</div>
```
Continue reading...