Here's one way, kind of a "hacky" way of doin it but it works.
Code Behind Code:
VB Code:
Protected MyConditional As Literal
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim condition As Boolean = False
If Not condition Then
MyConditional.Visible = True
End If
End Sub
Webform code(just the Literal control part):
Code:
<asp:Literal
Runat="server"
ID="MyConditional"
Visible="False"
Text="<script language='javascript'>alert('some message');location.href='http://www.microsoft.com/';</script>" />