2
Answers

session javascript and session ashx

Mega Anaska

Mega Anaska

7y
193
1
I want create session in java script like string path="test/"; session['pathfolder']=path and call it in ashx file. I tried like '<%=session["pathfolder"]='"+path+"'%>' but in ashx just result '+path+' not variable in string path. everyone can help me?
Answers (2)
0
Vulpes

Vulpes

NA 98.3k 1.5m 13y
As in Windows Forms, there are a number of ways to pass data between windows in WPF.

One way (possibly the one you're thinking of) is for a window to expose a reference to itself via a static field or property, which other windows can then use to access controls on that window.

A more object-oriented way is to use events which notify one window when data changes on another window and use the eventhandler arguments to pass the data.

Which of these is preferable depends on the circumstances.

The argument for using events is that they provide a more robust, scaleable and easier to maintain solution. However, unless one window is opening another, you still need a way to obtain a reference to the second window (and the controls on it) in order to subscribe to the appropriate events in the first place, So events on their own may not offer a complete solution.