Created
March 16, 2011 03:33
-
-
Save azcoov/871971 to your computer and use it in GitHub Desktop.
example weather checker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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