Search code examples
c#wpfsystem.web

System.web not have HttpCookie in C#. what's going wrong in WPF


when i want to use HttpCookie who a part of System.Web i found that intellisense does not show them nor they found in reference when i put using System.Web

Can someone show me what thing i need to do to use HttpCookie. i try with using System.Web but still i not see them in intellisense can someone show me how i can use HttpCookie.

i found problem in WPF project their is nothing problem come when i do that in ASP.NET MVC

i can see only three thing AspNetHostingPermission AspNetHostingPermissionAttribute AspNetHostingPermissionLevel


Solution

  • WPF does have a concept of Cookies, but they are different than what you are use to in Web Applications. What is it you are trying to do?

    You can use the GetCookie and SetCookie on the Application class. For an overview of cookies in WPF, you can read here:

    http://msdn.microsoft.com/en-us/library/ms750478.aspx#Cookies