Hello everyone,
I have made a custom module with a gridview on it. This gridview has a TemplateField with an ImageButton in it and some other fields. The gridview is wrapped in an UpdatePanel (UP1).
Below this updatepanel (in the .ascx) I have an UpdatePanelPopupExtender (From the Flan.Controls) and a updatepanel wrapping the content for the UPPE:
<cc1:UpdatePanelPopupExtender ID="uppe1" runat="server" TargetControlID="UpdatePanel2" AutoPostBack="true" OnClose="uppe1_Close" OffsetX="0" OffsetY="0" CalloutColor="blue" CalloutBorderColor="Black" />div style="display: none;">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<contenttemplate>
<!--Some content, e.g. a <table-->
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="gvActive" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel> </div>
In my Gridview1_RowCommand() event handler, I have some code getting the CommandArgument from the ImageButton from the corresponding row, and then displaying the details of the item clicked.
I actually have this scenario working on my developing machine, but somehow, when I upload it to the actual page I get an error outside the module, when I click the ImageButton, saying:
Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
I can reproduce this error on my dev. machine by logging on as host, switching from Edit to View mode (using the Control Panel) and clicking the ImageButton. The same error then occurs. However, when I am in Edit mode, it does not. And when I am logged in as a Standard user, it doesn't either. I have tried setting a breakpoint in the GridView_RowCommand() sub, but it seems it never gets this far.
Any thoughts and help is greatly appreciated.
/Jacob