Click here to Skip to main content
15,895,370 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: User Control Problem Pin
jc.net2-Aug-07 1:39
jc.net2-Aug-07 1:39 
AnswerRe: User Control Problem Pin
Captain Trips2-Aug-07 2:54
Captain Trips2-Aug-07 2:54 
QuestionRunning Window Media Player Pin
.NET- India 2-Aug-07 0:03
.NET- India 2-Aug-07 0:03 
AnswerRe: Running Window Media Player Pin
Christian Graus2-Aug-07 0:07
protectorChristian Graus2-Aug-07 0:07 
QuestionDataBind and check a CheckBox Pin
Rohde2-Aug-07 0:01
Rohde2-Aug-07 0:01 
QuestionDatagrid in asp.net 2005 Pin
zareee1-Aug-07 23:51
zareee1-Aug-07 23:51 
AnswerRe: Datagrid in asp.net 2005 Pin
just3ala22-Aug-07 1:04
just3ala22-Aug-07 1:04 
QuestionCookies Pin
#realJSOP1-Aug-07 23:40
mve#realJSOP1-Aug-07 23:40 
Using VS2005 on XP Pro...

I'm trying to write some code that determines whether or not cookies are blocked in the browser.

The way I'm doing it is to write a cookie and then try to read it back. The problem is that the cookie doesn't get written to the hard drive, so my cookie reading code assumes that cookies are blocked. Here's what I have:

public partial class _Default : CBasePage 
{
    public string m_cookieWarning;
    protected void Page_Load(object sender, EventArgs e)
    {
        m_cookieWarning       = "";
        string cookieName     = "dummy";
        Response.Cookies.Clear();
        HttpCookie testCookie = new HttpCookie(cookieName);
        testCookie.Value      = cookieName;
        testCookie.Expires    = DateTime.Now.AddMinutes(2);
        Response.Cookies.Add(testCookie);
        Response.Cookies.Clear();
        testCookie = Request.Cookies[cookieName];
        if (testCookie == null)
        {
            m_cookieWarning = "<span>This website requires that cookies be allowed</span>";
        }
    }
}


Anyone?


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


AnswerRe: Cookies Pin
Christian Graus2-Aug-07 0:04
protectorChristian Graus2-Aug-07 0:04 
GeneralRe: Cookies Pin
#realJSOP2-Aug-07 0:30
mve#realJSOP2-Aug-07 0:30 
GeneralRe: Cookies Pin
Guffa2-Aug-07 1:01
Guffa2-Aug-07 1:01 
QuestionForms Authentication - Will it really makes sence ? Pin
N a v a n e e t h1-Aug-07 23:20
N a v a n e e t h1-Aug-07 23:20 
AnswerRe: Forms Authentication - Will it really makes sence ? Pin
Urs Enzler1-Aug-07 23:35
Urs Enzler1-Aug-07 23:35 
Questionhow to create diffrent type of graph in .net Pin
yesu prakash1-Aug-07 23:03
yesu prakash1-Aug-07 23:03 
AnswerRe: how to create diffrent type of graph in .net Pin
Christian Graus1-Aug-07 23:09
protectorChristian Graus1-Aug-07 23:09 
QuestionVideos Pin
.NET- India 1-Aug-07 22:31
.NET- India 1-Aug-07 22:31 
Question[Message Deleted] Pin
Hareesh.P.R1-Aug-07 22:25
Hareesh.P.R1-Aug-07 22:25 
AnswerRe: WEB SERVICE DEPLOYMENT Pin
Christian Graus1-Aug-07 22:36
protectorChristian Graus1-Aug-07 22:36 
AnswerRe: WEB SERVICE DEPLOYMENT Pin
N a v a n e e t h1-Aug-07 22:50
N a v a n e e t h1-Aug-07 22:50 
AnswerRe: WEB SERVICE DEPLOYMENT Pin
Bino B3-Aug-07 7:24
Bino B3-Aug-07 7:24 
QuestionBased on html control,server control visible..., Pin
Member 38798811-Aug-07 21:56
Member 38798811-Aug-07 21:56 
AnswerRe: Based on html control,server control visible..., Pin
Christian Graus1-Aug-07 22:12
protectorChristian Graus1-Aug-07 22:12 
QuestionDataGrid problem Pin
Rahul Babu1-Aug-07 21:32
Rahul Babu1-Aug-07 21:32 
AnswerRe: DataGrid problem Pin
Imran Khan Pathan1-Aug-07 22:01
Imran Khan Pathan1-Aug-07 22:01 
QuestionCalendar changing year Pin
J Liang1-Aug-07 21:26
J Liang1-Aug-07 21:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.