private async Task LoadMoviesAsync() { var apiKey = ConfigurationManager.AppSettings["tmdb:ApiKey"]; var movieClient = new MovieClient(apiKey); var searchedMovie = TextBox1.Text; try { var movies = await movieClient.SearchMovieAsync(searchedMovie); MoviesDataList.DataSource = movies; MoviesDataList.DataBind(); } catch (Exception e) { TextBox1.Text = e.Message; } }
private async Task LoadMoviesAsync() { var environmentKey = Environment.GetEnvironmentVariable("TMDB_API_KEY"); var movieClient = new MovieClient(environmentKey); var searchedMovie = TextBox1.Text; try { var movies = await movieClient.SearchMovieAsync(searchedMovie); MoviesDataList.DataSource = movies.Results; MoviesDataList.DataBind(); } catch (Exception e) { TextBox1.Text = e.Message; } }