سؤال

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

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

You need to add a reference to System.Web in your project.

Right click the project in visual studio, select add reference, and select System.Web from teh list provided.

Check if your project is not Profiled for ".Net Framework 4.0 Client Profile" which is Default. It should be just ".Net 4.0 Framework"

Check if your project is not Profiled for ".Net Framework 4.0 Client Profile" which is Default. It should be just ".Net 4.0 Framework""

It worked for me. At first I had not been able to add ref System.Web, because was have profiled for ".Net Framework 4.0 Client Profile"...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top