<%@ Page Language="c#" %>
<script Language="c#" runat="server">
void Page_Load(object source, EventArgs e)
{
if (!(IsPostBack))
{
if (Request.Browser.Browser == "IE")
{
if (Request.Browser.MajorVersion < 6)
{
MyLabel.Text = "Time to upgrade Internet Explorer!";
}
else
{
MyLabel.Text = "Your copy of Internet Explorer is up to date.";
}
}
else
{
MyLabel.Text = "You're not using Internet Explorer";
}
}
}
</script>
<html>
<body>
<asp:Label id=MyLabel runat="server" Text=""/>
</body>
</html>
|