How to display FORM in DIV?

B

brett

I have a small FORM with an updatepanel control (ajax) that needs to
display in a DIV. There are two DIVs side by side in this page
(parent). A link is clicked in the left DIV, it loads an aspx page
(child) into the right DIV. That works fine if no FORM tags are in
the DIV (i.e. in the child). If I leave the FORM tag out of the child
and use the parent page's FORM, I run into problems with the
updatepanel in the child. The error says I need a scriptmanager,
which the parent has. I guess it isn't recognized because the aspx
I'm calling is processed before it gets into the parent (?).

Anyone have some suggestions on how I can do this?

Thanks,
Brett
 
G

GroupReader

I'm not sure I understand, but it sounds similar to what we are
doing. We use ajax to return the HTML from a UserControl (not
entire .aspx page), then update the innerHTML of the panel with the
HTML from the user control. UserControls don't have "forms" so we did
not run into any issues.

Here's something else to check. Are you having problems with multiple
"forms" or are you having problems with multiple "forms where
runat=server"?
 
B

brett

Here's something else to check. Are you having problems with multiple
"forms" or are you having problems with multiple "forms where
runat=server"?

No, I understand nested FORMs can't be used but it sounds as though
you guys aren't using AJAX updatepanel control either. That's where my
problem is. If I weren't trying to do a partial page update in this
one area (innerHTML section), it would work fine.
 
G

GroupReader

Not sure if this is the best way, but here's what we are doing. We've
got about about 10 UpdatePanels on one page and they each look like
this.


<div id="divXXX" style="background-color:#CFE6CF;cursor:hand;height:
25px;" align="center">
Panel title goes here
</div>
<asp:UpdatePanel ID="upnlXXX" runat="server">
<ContentTemplate>
<asp:panel ID="pnlXXX" runat="server" style="width:100%;">
<!-- User Control Goes In Here -->
<uc:MyPanelContentUserControl ID="ucXXX" runat="server" />
</asp:panel>

<cc1:CollapsiblePanelExtender ID="cpeXXX" runat="server"
TargetControlID="pnlXXX"
CollapsedSize="0"
Collapsed="true"
ExpandControlID="divXXX"
CollapseControlID="divXXX" />
</ContentTemplate>
</asp:UpdatePanel>


We're using a separate ASP.Net "Client Callback" to replace the
contents of each user control in each panel when the contents need to
be updated.
 

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

Top