Code

        public ActionResult Index()
        {
            
return View();
        }
      
        
public ActionResult GetWeather(string Id)
        {
            
//if (string.IsNullOrEmpty(Id)) { return null; }
            if (string.IsNullOrEmpty(Id)) { Id = New York; }
            StringBuilder sb 
= new StringBuilder();
            WeatherForecast wf 
= new WeatherForecast();
            WeatherForecasts wfs 
= wf.GetWeatherByPlaceName(Id);
            WeatherData[] wd 
= wfs.Details;
            sb.AppendFormat(
<B>Weather Forecast for {0}</B><br /><br />, wfs.PlaceName);
            
foreach (WeatherData d in wd)
            {
                
if (!string.IsNullOrEmpty(d.WeatherImage))
                {
                    sb.AppendFormat(
<img src=\{0}\ >, d.WeatherImage);
                    sb.AppendFormat(
 {0}, d.Day);
                    sb.AppendFormat(
, High {0}F, d.MaxTemperatureF);
                    sb.AppendFormat(
, Low {0}F<br />, d.MinTemperatureF);
                }
            }
            Response.Write(sb.ToString());
            
return null;
        }