Creating Web Task ASP Page for a Multitabbed Property Page
To create the ASP page for a multitabbed property page, you must complete the following steps.
Include the library file:
<!-- #include virtual="/admin/inc_framework.asp" -->
Call the library function to create the page and show it:
Dim retCode Dim page ' ' Create a tabbed property page. Note that L_PAGE_TITLE and myImage ' are initialized elsewhere retCode = SA_CreatePage(L_PAGE_TITLE, myImage, PT_TABBED, page) If (retCode <> gc_ERR_SUCCESS) Then ' Handle error End If ' add as many tabs as needed retCode = SA_AddTabPage(page, L_TAB_TITLE, idTab) If (retCode <> gc_ERR_SUCCESS) Then ' Handle error End If
' show the page, which will allow the framework to call the
' needed event handlers
retCode = SA_ShowPage(page)
If (retCode <> gc_ERR_SUCCESS) Then
' Handle error
End If
Provide the OnInitPage event function to perform any initialization needed:
Public Function OnInitPage(ByRef PageIn, ByRef EventArgIn) ' Do initialization here OnInitPage = True 'indicates success End Function
Provide the OnServeTabbedPropertyPage event function to output the actual page:
Public Function OnServeTabbedPropertyPage(ByRef PageIn, ByVal iTab, ByVal bIsVisible, ByRef EventArgIn) ' Provide code to output the content for the requested tab Select Case iTab Case idTab 'provide code to ouput this tab 'output should be different 'if the page is visible Case Else 'handle error End Select OnServeTabbedPropetyPage = True 'indicates success End Function
Provide the OnSubmitPage event function to perform the requested task:
Public Function OnSubmitPage(ByRef PageIn, ByRef EventArgIn) ' Provide code to process the action ' Can call WMI directly or call a back-end task OnSubmitPage = True 'indicates success End Function
Provide the OnPostBackPage event function to extract the configuration data from the form variables:
Public Function OnPostBackPage(ByRef PageIn, ByRef EventArgIn) ' Provide code to save the state of the page OnPostBackPage = True 'indicates success End Function
Provide the OnClosePage event function to perform any cleanup needed:
Public Function OnClosePage(ByRef PageIn, ByRef EventArgIn) ' Provide code to process the action ' Can call WMI directly or call a back-end task OnClosePage = True 'indicates success End Function
Related Topics
Adding a New Secondary Navigation Item
Adding a Web Task to a Navigation Page