I have three objects:
- A Page which contains
- A User Control (A) which contains
- Another User Control (B)
The scenario is an event in User Control A gets called, the Request object is still accessible here. But during that call, I attempt to call Request again through User Control B, User Control A's child class, and it starts throwing the "Request is not available in this context".
Is the Request object restricted only to the event caller?
Sample code:
protected void MainGridPanel_RowClicked( object sender, EventArgs e )
{
int id = 1
windowedModuleDetailList.ModuleDetailListPresenter.GetById( id );
moduleDetailWindow.Show();
}
moduleDetailWindow is child control B in this case. It's not relevant what code is done inside of the Show method because when it enters its scope, I do a check during debug, and the Request object was already inaccessible.
EDIT: Due to some external tools, using HttpContext.Current.Request is not an option. I'd really like to know why Request isn't visible to the child control.