I'm trying to pass a parameter to a controller method and I'm having problems with converting type int to C# object. Or more specifically type in to root.
- @{
- Layout = null;
- Root movieResult = ViewData["movies"] as Root;
- MovieResults movies = ViewData["movies"] as MovieResults;
- }
- "en">
- "UTF-8"/>
- "viewport" content="width=device-width, initial-scale=1"/>
-
Movie Streaming Availability App - "stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
- "stylesheet" type="text/css" href="css/site.css">
- class="container">class="row">
- @foreach (var movie in movies.Results)
- {
class="col-3">- "Movie" asp-action="MoviePage" asp-route-Id="@movie.Id">
"https://image.tmdb.org/t/p/w300/@movie.PosterPath" alt="@movie.Title">
- }

Sachin SinghPosted Dec 25, 2020, 7:40 AM
Paul DrakePosted Dec 25, 2020, 6:58 AM