Share via


Creating Web Task ASP Page for a Multitabbed Property Page

Server Appliance Kit

To create the ASP page for a multitabbed property page, you must complete the following steps.

  1. Include the library file:

    <!-- #include virtual="/admin/inc_framework.asp" --> 
    

  2. 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

  1. 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
    

  2. 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
    

  3. 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
    

  4. 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
    

  5. 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

Page Graphic

Adding a Web Task

Page Graphic

Adding a New Secondary Navigation Item

Page Graphic

Adding a Web Task to a Navigation Page

Page Graphic

Creating Web Task ASP for a Property Page

Page Graphic

Creating Web Task ASP for a Wizard Page