Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class HomeController
- Inherits System.Web.Mvc.Controller
- Function Index(ByVal Id As String, ByVal Path As String) As ActionResult
- Dim FileName As String = ""
- Dim ViewPath As String = ""
- If Id = "" Then Return View("~/views/home/index.vbhtml")
- Select Case Id.ToLower
- Case "about"
- If Path = "" Then FileName = Id
- End Select
- If FileName <> "" Then ViewPath = "~/views/home/" & FileName & ".vbhtml"
- If ViewPath = "" Then
- Return HttpNotFound()
- Else
- Return View(ViewPath)
- End If
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement