Monday, December 3, 2007

simplewait.aspx

simplewait.aspx: "simplewait.aspx Sub Page_Load() If Page.IsPostback Then ' user submitted page with customer ID ' create URL with query string for customer ID ' next page will not be a postback, so viewstate will be lost Dim sRefreshURL As String = Request.Url.ToString() _ & '?custID=' & txtCustomer.Text ' use META REFRESH to start loading next page mtaRefresh.Attributes.Add('http-equiv', 'refresh') mtaRefresh.Attributes.Add('content', '0;url=' & sRefreshURL) ' hide section and show 'wait' section frmMain.Visible = False divWait.Visible = True Else ' get customer ID from query string Dim sCustID As String = Request.QueryString('custID') If sCustID > '' Then ' page is loading from META REFRESH element and ' so currently shows the 'please wait' message ' a customer ID was provided so display results divResult.Visible = True ' set URL for 'Next Customer' hyperlink lnkNext.NavigateUrl = Request.FilePath ' get data and bind to DataGrid in the page FillDataGrid(sCustID) Else ' either this is the first time the page has been ' loaded, or no customer ID was provided ' display controls to select customer frmMain.Visible = True End If End If End Sub <"

No comments: