Grazie per la risposta.
Dunque se scrivo così funziona regolarmente e riesco a leggere il cookie generato da ASP:
Se invece scrivo così dà errore, perchè? qual'è la differenza?codice:Response.Cookies("email") = objRs("email") if (Request.Cookies["email"] != null) { string cks = Request.Cookies["email"].Value; Response.Write("Eccomi ... "); Response.Write(cks + " "); }
Errore:codice:Response.Cookies("accesso")("email") = objRs("email") if (Request.Cookies["accesso"]["email"] != null) { string cks = Request.Cookies["accesso"]["email"].Value; Response.Write("Eccomi ... "); Response.Write(cks + " "); }
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'string' does not contain a definition for 'Value' and no extension method 'Value' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 553: if (Request.Cookies["accesso"]["email"] != null)
Line 554: {
Line 555: string cks = Request.Cookies["accesso"]["email"].Value;
Line 556: Response.Write("Eccomi ...
");
Line 557: Response.Write(cks + "
");