How to use session variable in wpf application?



How to use session variable in wpf application?..

Answer / Arvind Kumar Verma

In WPF, you can manage session variables using the HttpSessionState class. First, declare the Session object in your code-behind file: System.Web.HttpSessionState BaseSession.nTo set a value:n```csharpnBaseSession["key"] = value; n```nAnd to retrieve a value:n```csharpnstring value = (string)BaseSession["key"]; n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WPF Interview Questions

Explain how you can display different data at run time and design time?

1 Answers  


What is wpf explain briefly?

1 Answers  


What are wpf controls?

1 Answers  


What deployment modes are available with wpf?

1 Answers  


Explain the need of "inotifypropertychanged" interface?

1 Answers  


what is xaml? What is the difference between xml and xaml?

1 Answers  


What does wpf stand for?

1 Answers  


Define is wpf and state its advantages?

1 Answers  


What are the controls and events in WPF?

1 Answers   Wipro,


Is it possible for a control to define a handler for an event, that the control can't itself raise?

1 Answers  


What do you know by content alignment in wpf?

1 Answers  


What are the four general kinds of xaml elements?

1 Answers  


Categories