Error: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type
Getting Error when I try to use search. This is my error:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Trazi(Int32)' in 'MvcSimpleModelBinding.Controllers.PersonController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Here is My Controller:
public class PersonController : Controller {
public ActionResult Search(int id)
{
var mm = DataBase.getById(id);
return View(mm);
}
}
My class DataBase:
public class DataBase
{
private static List<Person> people = new List<Person>();
private static int _nextId = 1;
public static List<Person> getAll() {
return people;}
public static Person getById(int id)
{
var buscar = people.Find(x => x.Id == id);
if (buscar == null)
{
throw new ArgumentNullException("id");
}
return buscar;}
View
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit"
name="name"value="Search"/>
</form>
}
<p>@Html.ActionLink("Create New",
"Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>@Html.DisplayNameFor(model =>
model.Name)
</th>
<th>@Html.DisplayNameFor(model =>
model.Age)
</th>
<th>
@Html.DisplayNameFor(model => model.Street)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.State)
</th>
<th>
@Html.DisplayNameFor(model => model.Zipcode)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Age)
</td>
<td>
@Html.DisplayFor(modelItem => item.Street)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.State)
</td>
<td>
@Html.DisplayFor(modelItem => item.Zipcode)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
</td>
</tr>
}
Routing:
public class RouteConfig{
public static void
RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
c# asp.net-mvc
add a comment |
Getting Error when I try to use search. This is my error:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Trazi(Int32)' in 'MvcSimpleModelBinding.Controllers.PersonController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Here is My Controller:
public class PersonController : Controller {
public ActionResult Search(int id)
{
var mm = DataBase.getById(id);
return View(mm);
}
}
My class DataBase:
public class DataBase
{
private static List<Person> people = new List<Person>();
private static int _nextId = 1;
public static List<Person> getAll() {
return people;}
public static Person getById(int id)
{
var buscar = people.Find(x => x.Id == id);
if (buscar == null)
{
throw new ArgumentNullException("id");
}
return buscar;}
View
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit"
name="name"value="Search"/>
</form>
}
<p>@Html.ActionLink("Create New",
"Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>@Html.DisplayNameFor(model =>
model.Name)
</th>
<th>@Html.DisplayNameFor(model =>
model.Age)
</th>
<th>
@Html.DisplayNameFor(model => model.Street)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.State)
</th>
<th>
@Html.DisplayNameFor(model => model.Zipcode)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Age)
</td>
<td>
@Html.DisplayFor(modelItem => item.Street)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.State)
</td>
<td>
@Html.DisplayFor(modelItem => item.Zipcode)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
</td>
</tr>
}
Routing:
public class RouteConfig{
public static void
RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
c# asp.net-mvc
1
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
You have nested forms which is invalid html (start by removing the inner<form>
tag)
– user3559349
Nov 24 '18 at 0:54
Based on your routing, you should be accessing thesearch
action method like this/search/101
where 101 can be replaced with any valid int32 value.
– Shyju
Nov 24 '18 at 1:17
add a comment |
Getting Error when I try to use search. This is my error:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Trazi(Int32)' in 'MvcSimpleModelBinding.Controllers.PersonController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Here is My Controller:
public class PersonController : Controller {
public ActionResult Search(int id)
{
var mm = DataBase.getById(id);
return View(mm);
}
}
My class DataBase:
public class DataBase
{
private static List<Person> people = new List<Person>();
private static int _nextId = 1;
public static List<Person> getAll() {
return people;}
public static Person getById(int id)
{
var buscar = people.Find(x => x.Id == id);
if (buscar == null)
{
throw new ArgumentNullException("id");
}
return buscar;}
View
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit"
name="name"value="Search"/>
</form>
}
<p>@Html.ActionLink("Create New",
"Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>@Html.DisplayNameFor(model =>
model.Name)
</th>
<th>@Html.DisplayNameFor(model =>
model.Age)
</th>
<th>
@Html.DisplayNameFor(model => model.Street)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.State)
</th>
<th>
@Html.DisplayNameFor(model => model.Zipcode)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Age)
</td>
<td>
@Html.DisplayFor(modelItem => item.Street)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.State)
</td>
<td>
@Html.DisplayFor(modelItem => item.Zipcode)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
</td>
</tr>
}
Routing:
public class RouteConfig{
public static void
RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
c# asp.net-mvc
Getting Error when I try to use search. This is my error:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Trazi(Int32)' in 'MvcSimpleModelBinding.Controllers.PersonController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Here is My Controller:
public class PersonController : Controller {
public ActionResult Search(int id)
{
var mm = DataBase.getById(id);
return View(mm);
}
}
My class DataBase:
public class DataBase
{
private static List<Person> people = new List<Person>();
private static int _nextId = 1;
public static List<Person> getAll() {
return people;}
public static Person getById(int id)
{
var buscar = people.Find(x => x.Id == id);
if (buscar == null)
{
throw new ArgumentNullException("id");
}
return buscar;}
View
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit"
name="name"value="Search"/>
</form>
}
<p>@Html.ActionLink("Create New",
"Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>@Html.DisplayNameFor(model =>
model.Name)
</th>
<th>@Html.DisplayNameFor(model =>
model.Age)
</th>
<th>
@Html.DisplayNameFor(model => model.Street)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.State)
</th>
<th>
@Html.DisplayNameFor(model => model.Zipcode)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Age)
</td>
<td>
@Html.DisplayFor(modelItem => item.Street)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.State)
</td>
<td>
@Html.DisplayFor(modelItem => item.Zipcode)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
</td>
</tr>
}
Routing:
public class RouteConfig{
public static void
RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
c# asp.net-mvc
c# asp.net-mvc
asked Nov 24 '18 at 0:46
E_CCE_CC
74
74
1
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
You have nested forms which is invalid html (start by removing the inner<form>
tag)
– user3559349
Nov 24 '18 at 0:54
Based on your routing, you should be accessing thesearch
action method like this/search/101
where 101 can be replaced with any valid int32 value.
– Shyju
Nov 24 '18 at 1:17
add a comment |
1
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
You have nested forms which is invalid html (start by removing the inner<form>
tag)
– user3559349
Nov 24 '18 at 0:54
Based on your routing, you should be accessing thesearch
action method like this/search/101
where 101 can be replaced with any valid int32 value.
– Shyju
Nov 24 '18 at 1:17
1
1
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
You have nested forms which is invalid html (start by removing the inner
<form>
tag)– user3559349
Nov 24 '18 at 0:54
You have nested forms which is invalid html (start by removing the inner
<form>
tag)– user3559349
Nov 24 '18 at 0:54
Based on your routing, you should be accessing the
search
action method like this /search/101
where 101 can be replaced with any valid int32 value.– Shyju
Nov 24 '18 at 1:17
Based on your routing, you should be accessing the
search
action method like this /search/101
where 101 can be replaced with any valid int32 value.– Shyju
Nov 24 '18 at 1:17
add a comment |
2 Answers
2
active
oldest
votes
The error means that there is no id
parameter in the search request, that is why MVC cannot even invoke the action method.
Now, let's figure out why the request is wrong. Let's see what we have in the view:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
</form>
}
Html helper Html.BeginForm
produces a new form (<form></form>
tags), but then you also add another form, so result html is:
<form method="get" ...>
<form>
Title:....
</form>
</form>
This is a problem, because nested forms are not supported in HTML. To fix it, you should remove extra <form>
tags inside the using:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
}
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
add a comment |
Your problem is here.
public ActionResult Search(int id)
You set an parameter for the action so every time when you enter the action you need an parameter: int id. For example, if you enter the corresponding view page (i.e. search page) from another page, e.g. Index, what you have to do is bringing your ruote value with your original URL. Below is my example:
Another View:
@Html.ActionLink("Search", "Home", new { id = 2 })
The example is actually equals to /Home/Search/2 and this is the format, /[Controller]/[Action]/[Route value] so you will not get the error again.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53454261%2ferror-the-parameters-dictionary-contains-a-null-entry-for-parameter-id-of-non%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The error means that there is no id
parameter in the search request, that is why MVC cannot even invoke the action method.
Now, let's figure out why the request is wrong. Let's see what we have in the view:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
</form>
}
Html helper Html.BeginForm
produces a new form (<form></form>
tags), but then you also add another form, so result html is:
<form method="get" ...>
<form>
Title:....
</form>
</form>
This is a problem, because nested forms are not supported in HTML. To fix it, you should remove extra <form>
tags inside the using:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
}
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
add a comment |
The error means that there is no id
parameter in the search request, that is why MVC cannot even invoke the action method.
Now, let's figure out why the request is wrong. Let's see what we have in the view:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
</form>
}
Html helper Html.BeginForm
produces a new form (<form></form>
tags), but then you also add another form, so result html is:
<form method="get" ...>
<form>
Title:....
</form>
</form>
This is a problem, because nested forms are not supported in HTML. To fix it, you should remove extra <form>
tags inside the using:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
}
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
add a comment |
The error means that there is no id
parameter in the search request, that is why MVC cannot even invoke the action method.
Now, let's figure out why the request is wrong. Let's see what we have in the view:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
</form>
}
Html helper Html.BeginForm
produces a new form (<form></form>
tags), but then you also add another form, so result html is:
<form method="get" ...>
<form>
Title:....
</form>
</form>
This is a problem, because nested forms are not supported in HTML. To fix it, you should remove extra <form>
tags inside the using:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
}
The error means that there is no id
parameter in the search request, that is why MVC cannot even invoke the action method.
Now, let's figure out why the request is wrong. Let's see what we have in the view:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
<form>
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
</form>
}
Html helper Html.BeginForm
produces a new form (<form></form>
tags), but then you also add another form, so result html is:
<form method="get" ...>
<form>
Title:....
</form>
</form>
This is a problem, because nested forms are not supported in HTML. To fix it, you should remove extra <form>
tags inside the using:
@using (Html.BeginForm("Search", "Person",FormMethod.Get))
{
Title: @Html.TextBox("id");
<input type="submit" name="name" value="Search"/>
}
edited Nov 24 '18 at 1:10
answered Nov 24 '18 at 1:05
Alex SikilindaAlex Sikilinda
2,194925
2,194925
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
add a comment |
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
Thanks for the reply but now I have another error :Value cannot be null. Parameter name: id..I don't know how to solve this error
– E_CC
Nov 24 '18 at 22:37
add a comment |
Your problem is here.
public ActionResult Search(int id)
You set an parameter for the action so every time when you enter the action you need an parameter: int id. For example, if you enter the corresponding view page (i.e. search page) from another page, e.g. Index, what you have to do is bringing your ruote value with your original URL. Below is my example:
Another View:
@Html.ActionLink("Search", "Home", new { id = 2 })
The example is actually equals to /Home/Search/2 and this is the format, /[Controller]/[Action]/[Route value] so you will not get the error again.
add a comment |
Your problem is here.
public ActionResult Search(int id)
You set an parameter for the action so every time when you enter the action you need an parameter: int id. For example, if you enter the corresponding view page (i.e. search page) from another page, e.g. Index, what you have to do is bringing your ruote value with your original URL. Below is my example:
Another View:
@Html.ActionLink("Search", "Home", new { id = 2 })
The example is actually equals to /Home/Search/2 and this is the format, /[Controller]/[Action]/[Route value] so you will not get the error again.
add a comment |
Your problem is here.
public ActionResult Search(int id)
You set an parameter for the action so every time when you enter the action you need an parameter: int id. For example, if you enter the corresponding view page (i.e. search page) from another page, e.g. Index, what you have to do is bringing your ruote value with your original URL. Below is my example:
Another View:
@Html.ActionLink("Search", "Home", new { id = 2 })
The example is actually equals to /Home/Search/2 and this is the format, /[Controller]/[Action]/[Route value] so you will not get the error again.
Your problem is here.
public ActionResult Search(int id)
You set an parameter for the action so every time when you enter the action you need an parameter: int id. For example, if you enter the corresponding view page (i.e. search page) from another page, e.g. Index, what you have to do is bringing your ruote value with your original URL. Below is my example:
Another View:
@Html.ActionLink("Search", "Home", new { id = 2 })
The example is actually equals to /Home/Search/2 and this is the format, /[Controller]/[Action]/[Route value] so you will not get the error again.
answered Nov 24 '18 at 8:46
Wing Kui TsoiWing Kui Tsoi
156112
156112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53454261%2ferror-the-parameters-dictionary-contains-a-null-entry-for-parameter-id-of-non%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What is the URL you are trying ?
– Shyju
Nov 24 '18 at 0:49
You have nested forms which is invalid html (start by removing the inner
<form>
tag)– user3559349
Nov 24 '18 at 0:54
Based on your routing, you should be accessing the
search
action method like this/search/101
where 101 can be replaced with any valid int32 value.– Shyju
Nov 24 '18 at 1:17