dotnet / dotnet/aspnetcore

Anchor tag helper should allow for multiple route value parameters with the same name

Open
#40,556 1 comment 1 reaction 0 assignees View on GitHub
area-mvc feature-routing investigate
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

The [route values property](https://github.com/dotnet/aspnetcore/blob/2684644cea1322ebd213311293d93faf8d7e9bab/src/Mvc/Mvc.TagHelpers/src/AnchorTagHelper.cs#L137) in the anthor tag helper only allows for route values to have a single value since it of type `IDictionary`. Therefore when you say:

```
Link 1
```

If the query string is `?filter=Red&filter=Green` it produces:

```
Link 1
```

However if you say:

```
kvp.Key, kvp => (object?)kvp.Value))">Link 1
```

It correctly produces:

```
Link 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.