Here's a bit of .Net code that allows you to check the state of a browser's cookie settings... Enabled or Disabled. It does use a redirect, but it still only requires a single page:
Sample Default.aspx.cs |
// default namespace directives here... public partial class _Default : System.Web.UI.Page { bool cookies = false; protected void Page_Load(object sender, EventArgs e) { cookies = cookiecheck(); Response.Write("cookies = " + cookies.ToString()); } private bool cookiecheck() { if (Session["CookiesEnabled"] != null) return true; if (!IsPostBack) { if (Page.Request.QueryString["ce"] == null) { Session["CookiesEnabled"] = true; Response.Redirect(Request.Url.ToString() + "?ce=1"); } } return false; } } |