Hi

Does anyone know how to delete a subkey from a cookie in ASP 
please?  I know I can delete a cookie with "expires" but it seems 
that the .Remove method only applies in ASP.NET.  I tried to delete 
it by deleting it from the querystring returned, and reassigning it 
using Response.Cookies, but that didn't work.  Here is my code:

var cookiestr = String(Request.Cookies("Units"));
var cookiearr = cookiestr.split("&");
cookiearr.sort();
for (intItem = 0; intItem <cookiearr.length; intItem++)
     {
    if (String(cookiearr[intItem].substr(0,String(Request.Form
("Unitcode")).length)) == String(Request.Form("Unitcode")))
      {
      var cookiearr1 = cookiearr.slice(0,intItem);
      var cookiearr2 = cookiearr.slice(intItem+1);
      Response.Write("arr1=" + cookiearr1.join("&") + "<br>");
      Response.Write("arr2=" + cookiearr2.join("&") + "<br>");
      cookiearr = cookiearr1.concat(cookiearr2);
      Response.Write("arr=" + cookiearr.join("&") + "<br>");
      var cookiestr = cookiearr.join("&");
      Response.Cookies("Units") = String(cookiestr);
      }
    };




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hlp998l/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1123897792/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to