Objective:
To show how the webpage link with visual basic
Content / Procedure:
- List out the webpage component declaration
- Visual basic programming base on declaration made
- Identify the sequence of the programming in this system.
Result and Analysis:
Previous week, the explanation regarding the way of create the webpage using the page breeze was explane. In the explanation, there had touch the declaration every component in every single web page created. Now, time to explain the method in order to make the web page working together with the interface created using visual basic. First, identify the declaration in the web page then list out to make it easy to program in visual basic. For example, administration access web page(pelajar), there have log in and password. Log in declare as namapr and password declare as kelaspr. So, in the visual basic the programming as below :
Dim namapr As String, kelaspr As String
Pos = InStr(1, postedData, "namapr=") + 6
namapr = Mid(postedData, Pos + 1, Len(postedData) - Pos)
namapr = Mid(namapr, 1, Pos - 1)
namapr = UnformatString(namapr)
Text1.Text = namapr
Pos = InStr(1, postedData, "&kelaspr=") + 8
kelaspr = Mid(postedData, Pos + 1, Len(postedData) - Pos)
Pos = InStr(1, kelaspr, "&")
kelaspr = Mid(kelaspr, 1, Pos - 1)
kelaspr = UnformatString(kelaspr)
Text2.Text = kelaspr
If namapr = Text5.Text And kelaspr = Text6.Text Then
sckServer(index).SendData FormatPage(GetFile(AddASlash(indexDir) + Text7.Text))
Else
sckServer(index).SendData FormatPage(GetFile(AddASlash(indexDir) + Text8.Text))
End If
Visual basic will 'receive' input from the webpage then VB will continue the process to get the output. For this program, VB will 'receive' input key-in by user. Input log-in and password will process by compare. If the log-in and password same with the existing record then the system will allow the admin to proceed the access.
Conclusions:
The input from the webpage will only process when VB recognize the unique identifier in the programming. Afterward, the visual basic will link to datase created to ensure the input key-in by user same with the data stored.