Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Partial Public Class Include_UpdatePanel
    Inherits System.Web.UI.Page
    'Global variables
    Protected Shared IncludeFile As String = ""


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim sm As ScriptManager = ScriptManager.GetCurrent(Page)

        'Set defaults
        If sm.IsInAsyncPostBack = False AndAlso Page.IsCallback = False AndAlso Page.IsPostBack = False Then
            IncludeFile = "Overview.htm"
        End If

        'Check defaults
        If IncludeFile = "" Then
            IncludeFile = "Overview.htm"
        End If

        BuildControl()
    End Sub


    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
        IncludeFile = "Features.htm"
        BuildControl()
    End Sub


    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs)
        IncludeFile = "Deployment.htm"
        BuildControl()
    End Sub


    Private Sub BuildControl()
        myInclude.IncludeFileURL = "~/Include/Files/" & _
            IncludeFile
        myInclude.DataBind()
    End Sub

End Class