Skip to content

Instantly share code, notes, and snippets.

@azcoov
Created March 16, 2011 03:33
Show Gist options
  • Save azcoov/871971 to your computer and use it in GitHub Desktop.
Save azcoov/871971 to your computer and use it in GitHub Desktop.
example weather checker
Imports System.Web.Mvc
Namespace Controllers
<HandleError> _
Public Class HomeController
Inherits Controller
Public Function Index() As ActionResult
Return View()
End Function
<AcceptVerbs("POST")> _
Public Function Index(zip As String) As ActionResult
Dim weather As New WeatherChecker.wsf.cdyne.com.Weather()
Dim data = weather.GetCityWeatherByZIP(zip)
ViewData("City") = data.City
ViewData("State") = data.State
ViewData("Temperature") = data.Temperature
Return View("Result")
End Function
End Class
End Namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment