'GET: /Home/ApplyNow
Function ApplyNow() As ActionResult
Dim customerWebSession = New CKCustomerWebSession
customerWebSession.GeneratedCode = CodeGenerator.CodeCheckUnique()
Return View(customerWebSession)
End Function
'POST: /Home/ApplyNow
<HttpPost()>
Function ApplyNow(WebSession As CKCustomerWebSession) As ActionResult
If ModelState.IsValid Then
db.WebSessions.Add(WebSession)
db.SaveChanges()
Return RedirectToAction("Page1", "Session", WebSession)
Else
Return View(WebSession)
End If
End Function
'GET: /Session/Page1
Function Page1(WebSession As CKCustomerWebSession) As ActionResult
Return View(WebSession)
End Function
'POST: /Session/Page1
<HttpPost()>
<ActionName("Page1")>
Function Page1Post(WebSession As CKCustomerWebSession) As ActionResult
If ModelState.IsValid Then
db.WebSessions.Add(WebSession)
db.SaveChanges()
Return RedirectToAction("Page2", "Session", WebSession)
Else
Return View(WebSession)
End If
End Function
ASKER
ASKER
ASKER
ASKER
ASKER
The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications
TRUSTED BY