VB Code:
  1. If blnSomeCondition Then
  2. Page.RegisterStartupScript(.....)
  3. Else
  4. Page.RegisterStartupScript(........)
  5. End If