Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

59 рядки
1.5KB

  1. <%
  2. Class HomeController_Class
  3. Private m_useLayout
  4. Private m_title
  5. Private Sub Class_Initialize()
  6. m_useLayout = True
  7. m_title = "Home"
  8. End Sub
  9. Public Property Get useLayout
  10. useLayout = m_useLayout
  11. End Property
  12. Public Property Let useLayout(v)
  13. m_useLayout = v
  14. End Property
  15. Public Property Get Title
  16. Title = m_title
  17. End Property
  18. Public Property Let Title(v)
  19. m_title = v
  20. End Property
  21. Public Sub Index()
  22. %>
  23. <!--#include file="../views/Home/index.asp" -->
  24. <%
  25. End Sub
  26. ' Static action dispatch (AxonASP mishandles runtime-built Eval/Execute calls),
  27. ' called through <Name>Controller_Invoke at the bottom of this file.
  28. Public Sub Invoke(actionName, args)
  29. Select Case LCase(actionName)
  30. Case "index" : Index
  31. Case Else
  32. Err.Raise 438, "HomeController_Class", "Action '" & actionName & "' not found"
  33. End Select
  34. End Sub
  35. End Class
  36. Dim HomeController_Class__Singleton
  37. Function HomeController()
  38. If IsEmpty(HomeController_Class__Singleton) Then
  39. Set HomeController_Class__Singleton = New HomeController_Class
  40. End If
  41. Set HomeController = HomeController_Class__Singleton
  42. End Function
  43. ' Global entry point used by MVC_InvokeAction via GetRef. A separate call site per controller
  44. ' avoids AxonASP binding a shared call site to the first controller's Invoke.
  45. Sub HomeController_Invoke(actionName, args)
  46. HomeController().Invoke actionName, args
  47. End Sub
  48. %>

Powered by TurnKey Linux.