I am developing the asp.net using Vb.net code. I need to notify my client if client's browser is disabled the cookies, when the launch the asp.page.

Pls help me.


According to this MSDN article, you have to test by writing then reading the cookie. If you cannot read the cookie you wrote, you assume that cookies are turned off in the browser. Then, you can display a message to the user about the problem.


Read the section: Determining Whether a Browser Accepts Cookies

Thanks all of you. solved. below is the code

function CookieSetText()
              var cookieEnabled=(navigator.cookieEnabled)? true : false
              //if not IE4+ nor NS6+
              if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled)
                cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false
              if (cookieEnabled)
                document.write("Cookies are enabled");
                document.write("Cookies are not enabled");
window.onload = function () {
            //calling the function on page load