Surya Prakash

Surya Prakash

  • NA
  • 1.7k
  • 1.2m

unable to modify session values in Thread

Jun 7 2011 5:50 AM
Hi,

I have page1.aspx, in page load I have function which will be called in Thread as
<pre lang="msil">if (isEmail == 1)
           {
               //objmyClass.deliveryType = &quot;email&quot;;
               Thread cwpThread = new Thread(new ParameterizedThreadStart(ProcessMyList));
               abc.Start(&quot;email&quot;);

           }
           if (isFax == 1)
           {
               //objmyClass.deliveryType = &quot;fax&quot;;
               Thread abc = new Thread(new ParameterizedThreadStart(ProcessMyList));
               abc.Start(&quot;fax&quot;);
           }</pre>

In the above code ProcessMyList will be called in thread & in this function I am assigning session values as <pre lang="midl">Session[&quot;EmailFileIds&quot;] = &quot;1234&quot;;
           Session[&quot;FaxFileIds&quot;] = &quot;4321&quot;;</pre>
. But when I navigate to another page, I am not able to read these session values.

help me in this regard.

Thanks

Answers (1)