When is a cookie available?
<p>Hi i have a web application where i plant a cookie on my page. Then the user goes to another page, and from that page calls my page from a script, like this: </p>

<pre><code>&lt;script type="text/javascript" src="http://domain.com/page.aspx?id=6" &gt;&lt;/script&gt;
</code></pre>

<p>But i cant access the cookie when it calls my page, why not? and how to work around it?</p>

<p>Please note that this question is in relation to: 
<a href="http://stackoverflow.com/questions/2660427/javascript-and-webshop-tracking-affiliate-across-websites-how-to-do">http://stackoverflow.com/questions/2660427/javascript-and-webshop-tracking-affiliate-across-websites-how-to-do</a></p>

<p><strong>Edit</strong>
The "other" page is on a entirely different domain. My code is in ASP.NET, but as far as i know its the same for all languages: </p>

<p>Planting the cookie (Default.aspx):</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cookies["affiliate"].Value = "InnovationPartner";
        Response.Cookies["affiliate"].Expires = DateTime.Now.AddDays(7);
        ...
    }
</code></pre>

<p>Retrieving the cookie (after round-trip) (Collect.aspx):</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
    {
        bool affiliate = Request.Cookies["affiliate"] != null ? true : false;
        ...
    }
</code></pre>
