Welcome Guest Search | Active Topics | Sign In | Register

Request is not available in this context Options
jdownes
Posted: Friday, November 30, 2012 2:28:31 PM
Rank: Newbie
Groups: Member

Joined: 11/30/2012
Posts: 5
Just started working on ASP.NET 1.1 app. Requirement is to have popup dialog which hosts ascx control. I have built a control

<%@ Control Language="vb" AutoEventWireup="false" Codebehind="LabelAddEditDialog.ascx.vb" Inherits="CaseManagement.LabelAddEditDialog" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="eo" Namespace="EO.Web" Assembly="EO.Web" %>
<%@ Register TagPrefix="bv" TagName="LabelAddEdit" Src="~/UserControls/LabelAddEdit.ascx" %>
<script lang="javascript">
function onDialogResize(DialogBox)
{
}
</script>
<style>
IMG { MARGIN-TOP: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px }
</style>
<eo:callbackpanel id="CallbackPanel1" runat="server" Triggers="{ControlID:lbLabelEditSelection_Show;Parameter:},{ControlID:dlgLabelEditSelection;Parameter:}">
<DIV id="divMainLabelEditSelection">
<DIV id="divLabelEditSelection_ShowSelection">
<asp:linkbutton id="lbLabelEditSelection_Show" runat="server" CausesValidation="False">Label Edit</asp:linkbutton></DIV>
<eo:dialog id="dlgLabelEditSelection" onresize="onDialogResize(this)" runat="server" ResizeImageUrl="00020014"
RestoreButtonUrl="00070103" BackColor="White">
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma"></HeaderStyleActive>
<ContentTemplate>
<bv:LabelAddEdit id="ucLabelAddEdit" runat="server"/>
</ContentTemplate>
<FooterTemplate>
<asp:Button id="btnLabelEditSelectionOk" runat="server" Width="60px" Text="OK" CausesValidation="False"></asp:Button>
<asp:Button id="btnLabelEditSelectionCancel" runat="server" Width="60px" Text="Cancel" Visible="true"
CausesValidation="False"></asp:Button>
</FooterTemplate>
</eo:dialog></DIV>
</eo:callbackpanel>

which works fine if is the last control on page, as such

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ProcHistorySearch.ascx.vb" Inherits="CaseManagement.UserControls.ProcHistorySearch" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="bv" TagName="ProcHistorySearchResult" Src="~/UserControls/ProcHistorySearchResult.ascx" %>
<%@ Register TagPrefix="bv" TagName="ProcHistorySearchInput" Src="~/UserControls/ProcHistorySearchInput.ascx" %>
<%@ Register TagPrefix="bv" TagName="lu" Src="~/UserControls/Dialogs/LabelAddEditDialog.ascx" %>


<asp:Panel ID="Something" Runat="server">
<TABLE cellSpacing="0" cellPadding="0">
<TR class="TitleRow">
<TD class="TitleText" colSpan="3">Procedural History Search
</TD>
</TR>
<TR>
<TD>
<bv:ProcHistorySearchInput id="ucProcHistorySearchInput" runat="server"></bv:ProcHistorySearchInput>
<bv:ProcHistorySearchResult id="ucProcHistorySearchResult" runat="server" visible="false"></bv:ProcHistorySearchResult>
</TD>
</TR>
</TABLE>
</asp:Panel>
<bv:lu id="lae" runat="server" />

If I add to end of page a second instance

<bv:lu id="Lu1" runat="server" />


I receive:

Request is not available in this context
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request is not available in this context

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Request is not available in this context]
System.Web.UI.Page.get_Request()
EO.Web.Internal.kp.a(Control A_0, Boolean& A_1, String& A_2, String& A_3, String& A_4)
EO.Web.Internal.kp.a()
EO.Web.Internal.kp.g()
EO.Web.Internal.kp.e()
EO.Web.WebControlBase.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

I have tried all kinds of different things.

If I replace <ContentTemplate> tag with anything else it fails the same, EXCEPT for EO treeview. I tried html elements, asp controls, other EO objects such as calendar and colorpicker, to no avail.

Aside: I can put different second control with same <eo:callbackpanel>/<eo:dialog> tags(in other words, hosting a different ascx control), and it still fails.

Thanks for any help!


eo_support
Posted: Sunday, December 2, 2012 11:47:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We tested your code on ASP.NET 2.0 with the latest build and it seems to works fine. We have stopped supporting ASP.NET 1.1 quite a while ago. So you may want to consider switching to ASP.NET 2.0.

Thanks!
jdownes
Posted: Monday, December 3, 2012 9:11:14 AM
Rank: Newbie
Groups: Member

Joined: 11/30/2012
Posts: 5
Can you please confirm that in ASP.NET 1.1 that the code above was valid? I do not have short term the option of moving to 2.0; long term this is moving to 4.0. But the fact that the EO treeview works, and no other control(EO, ASP) works in its place is baffling to me. Currently I am trying to step all calls for the treeview to see if there is something in there that is not happening for other controls.

Also, any direction on what is happening with the internal EO calls to:

EO.Web.Internal.kp.e()(and g(),a()) would be helpful.

Thank you
eo_support
Posted: Monday, December 3, 2012 9:18:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Your code looks fine to us but since we have stopped supporting ASP.NET 1.1 a long time ago, we no longer test or investigate any issue related to ASP.NET 1.1.

Thanks!
jdownes
Posted: Tuesday, December 4, 2012 1:26:28 PM
Rank: Newbie
Groups: Member

Joined: 11/30/2012
Posts: 5
I have resolved. Developer error. Thanks for your time and assistance.
eo_support
Posted: Tuesday, December 4, 2012 1:28:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Great. Thanks for the update. Glad to hear that you got it resolved.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.