Session lost after Server.Transfer

Joined
Aug 17, 2008
Messages
1
Reaction score
0
My code is:

Code:
if (ctx.Request.RawUrl.Contains("/Category/"))
        {
            string[] strArray = ctx.Request.RawUrl.Split(new string[] { "/" } , StringSplitOptions.RemoveEmptyEntries);
            string strCategoryName = strArray[strArray.Length - 1].Replace("_", " ");
            
            DALTableAdapters.categoryTableAdapter catAdapter = new DALTableAdapters.categoryTableAdapter();
            DAL.CategoryDataTable catTable = catAdapter.GetCategoryByCategoryId(null, strCategoryName);

            Server.Transfer("~/view_jobs.aspx?catId=" + catTable[0].categoryId);
        }

On view_jobs.aspx I can't access any session variable that i set before??? On accessing Session["xyz"] it threw an exception saying that enable session state!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top