asp.net core won't bind the id value
up vote
0
down vote
favorite
I have the standard default route mapped.
app.UseMvc(config =>
{
config.MapRoute(
"Default",
"{controller=App}/{action=Index}/{id?}"
);
});
In one of my controllers I have an action:
public IActionResult EditTask(int taskId)
I used the FIrefox dev toolbar to verify that the ID value is passed correctly:
window.location = "/Admin/EditTask/" + dataItem.TaskId;
I don't get why asp.net will not map the taskId to the action parameter.
asp.net-core
add a comment |
up vote
0
down vote
favorite
I have the standard default route mapped.
app.UseMvc(config =>
{
config.MapRoute(
"Default",
"{controller=App}/{action=Index}/{id?}"
);
});
In one of my controllers I have an action:
public IActionResult EditTask(int taskId)
I used the FIrefox dev toolbar to verify that the ID value is passed correctly:
window.location = "/Admin/EditTask/" + dataItem.TaskId;
I don't get why asp.net will not map the taskId to the action parameter.
asp.net-core
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have the standard default route mapped.
app.UseMvc(config =>
{
config.MapRoute(
"Default",
"{controller=App}/{action=Index}/{id?}"
);
});
In one of my controllers I have an action:
public IActionResult EditTask(int taskId)
I used the FIrefox dev toolbar to verify that the ID value is passed correctly:
window.location = "/Admin/EditTask/" + dataItem.TaskId;
I don't get why asp.net will not map the taskId to the action parameter.
asp.net-core
I have the standard default route mapped.
app.UseMvc(config =>
{
config.MapRoute(
"Default",
"{controller=App}/{action=Index}/{id?}"
);
});
In one of my controllers I have an action:
public IActionResult EditTask(int taskId)
I used the FIrefox dev toolbar to verify that the ID value is passed correctly:
window.location = "/Admin/EditTask/" + dataItem.TaskId;
I don't get why asp.net will not map the taskId to the action parameter.
asp.net-core
asp.net-core
asked Nov 10 at 0:38
tnk479
1033
1033
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Change EditTask(int taskId)
to EditTask(int id)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Change EditTask(int taskId)
to EditTask(int id)
add a comment |
up vote
1
down vote
accepted
Change EditTask(int taskId)
to EditTask(int id)
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Change EditTask(int taskId)
to EditTask(int id)
Change EditTask(int taskId)
to EditTask(int id)
answered Nov 10 at 0:41
Alex Sikilinda
2,144924
2,144924
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f53234991%2fasp-net-core-wont-bind-the-id-value%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