ASP.NET : how to get Value of QueryString in thread method?
<p>I got an error when trying to get the value of <code>Int32.Parse(Request.QueryString["PLCID"].ToString())</code> in the thread method and i tried to use parameterizedthread but faild</p>

<p>here my code snippet</p>

<pre><code>protected void btnReqConfirm_Click(object sender, EventArgs e)
{
    Int32 val = Int32.Parse(Request.QueryString["PLCID"].ToString());
    id = Guid.NewGuid();

    ThreadStart ts = new ThreadStart(longRunningProcess);
    Thread th = new Thread(ts);
    th.Start();

    Response.Redirect("Status.aspx?ID="+id.ToString());
}
protected void longRunningProcess()
{
    String _MachineName = String.Empty;
    _MachineIP = String.Empty;
    DBLayer.getMachineByPLCID(Int32.Parse(Request.QueryString["PLCID"].ToString()), out _MachineName, out _MachineIP);

    if (DBLayer.insertRequest(User.Identity.Name, DBLayer.getMachineID(_MachineName), Convert.ToDateTime(lblReqFromVal.Text), Convert.ToDateTime(lblReqToVal.Text)))
    {
        _PLCName = DBLayer._getPlCByID(Int32.Parse(Request.QueryString["PLCID"].ToString()));

        //stop mail now
        LogicLayer.AddNewListItem("Confirmation Mail", "You can initiate your session directly from this link : " + string.Format(@"http://IP/RRRProject/DirectSessionPage.aspx?Machine={0}", _MachineIP), (User.Identity.Name).Substring(5) + "@invensys.com");
        lblConfirmationMessage.Visible = true;
        lblConfirmationMessage.ForeColor = Color.Green;

        Thread.Sleep(9000);
        SimpleProcessCollections.Add(id, "Some result.");
    }
}
</code></pre>

<p>any idea??</p>
