Steve

Steve

  • NA
  • 3
  • 0

Open a New Window from the .VB Code File

Sep 20 2007 9:33 AM

Although ASP.NET is new to me, I still feel foolish asking such a simple question about a common task required for millions of web sites. I've spent hours seeking the answer, but without success, probably because it's so common and simple that everyone is expected to know it.

An InformationRequired page has an 'Agree to Terms & Conditions' checkbox. If it's unchecked when the Submit button is clicked, a message box is displayed; If it's checked when the Submit button is clicked, a Content page is displayed in a new window. I can do everything except the last bit. Here's the code:
----------------------------------------------------------------------
Partial Class _Default
  Inherits System.Web.UI.Page

  Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click

    'Has the visitor agreed to the T&C?
    If chkTC.Checked Then
      'Open new browser window for Content.aspx

CAN ANYONE PROVIDE THE CODE TO GO HERE, PLEASE?

    Else
      MsgBox("You must agree to the TERMS & CONDITIONS by selecting the box before proceeding.")
    End If

  End Sub

End Class
----------------------------------------------------------------------

 


Answers (3)