Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi guys,

 

I am using the FrontController pattern and I have the following two aspx pages.

 

Test1.aspx

 
public class handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
	...
	context.Items["datatable"] = dt;
	context.Server.Transfer("Test2.aspx");
}
}

 

Test2.aspx

 
DataTable dt2 = (DataTable)Context.Items["datatable"];

 

In Test1.aspx I assign a datatable (dt) to context and in Test2.aspx I can use Context to retrieve it. So is it context == Context? :confused:

 

Thanks for your help.

 

Michael

There is no spoon. <<The Matrix>>
  • Leaders
Posted

Context.Items["datatable"] is an object , in this case a DataTable by the look of it , so you are casting the object to a DataTable.

basically it's not context = context , it's context = datatable

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...