|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Web.Utility;
namespace JavaScriptCookieChecker
{
public partial class _Default : System.Web.UI.Page
{
private const string BrowserCheckJavaScript = "Either your web browser is not capable of supporting JavaScript at all or the use of JavaScript has been purposely disabled.";
private const string BrowserCheckCookie = "The use of Cookie in your browser has been purposely disabled.";
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
CheckBrowser();
}
private void CheckBrowser()
{
StringBuilder error = new StringBuilder();
if (this.BrowserChecker1.BrowserJavaScriptStatus == BrowserStatus.Disabled)
error.Append(BrowserCheckJavaScript);
if (this.BrowserChecker1.BrowserCookieStatus == BrowserStatus.Disabled)
error.Append(BrowserCheckCookie);
if (error.Length > 0)
this.lblMessage.Text = error.ToString();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Microsoft Certified Professional Developer (MCPD).
C#, ASP.NET, SharePoint, Microsoft Dynamics CRM, GIS