Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:32:23+00:00 2026-06-11T10:32:23+00:00

I have a testMain.aspx page showing an editable listview. In addition, it contains a

  • 0

I have a “testMain.aspx” page showing an editable listview. In addition, it contains a button that triggers a jquery UI modal dialog, which dynamically loads “testModal.aspx”. This modal contains a dropdownlist which the user chooses and clicks a button to submit back to the server. I want the modal to submit (to testModal.aspx) and then close so I’m viewing testMain.aspx.

The issue I’ve run into is after submit & close of modal, any clicks (ie. linkbuttons to edit listview) now submit to the modal.aspx rather than main.aspx.

Of Note:

  • testMain.aspx uses a masterpage (which contains a form element)
  • The listview is contained in an asp:updatepanel
  • The problem doesn’t occur until I load (.load()) the modal, before doing so, my clicks postback to testMain.aspx (as expected)

Masterpage.master

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <div id="page">
        <form id="form1" runat="server">
        <table summary="" class="pageTable">
            <tr>
                <td class="contentArea">
                    <asp:ContentPlaceHolder ID="ContentPage" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>

testMain.aspx

<script type="text/javascript">
    $(document).ready(function () {
        var $dialog = $('#foo').dialog({
            autoOpen: false,
            modal: true
        });

        $("#foo").parent().appendTo($("form:first"));

        $('#fooBtn').click(function () {
            $dialog.load('testModal.aspx');
            $dialog.dialog('open');
            return false;
        });
    });
</script>

<ajax:UpdatePanel runat="server" ID="updPanelGrid" UpdateMode="Conditional" RenderMode="Inline"
    ChildrenAsTriggers="false">
    <ContentTemplate>
        <asp:ListView ID="ListView1" runat="server" EnableModelValidation="True"
         ...
        </asp:ListView>
    </ContentTemplate>
    <Triggers>
        <ajax:AsyncPostBackTrigger ControlID="listview1" EventName="ItemEditing" />
        <ajax:AsyncPostBackTrigger ControlID="listview1" EventName="ItemDeleting" />
        <ajax:AsyncPostBackTrigger ControlID="listview1" EventName="ItemCanceling" />
        <ajax:AsyncPostBackTrigger ControlID="listview1" EventName="ItemUpdating" />
        <ajax:AsyncPostBackTrigger ControlID="listview1" EventName="ItemInserting" />
    </Triggers>
</ajax:UpdatePanel>

testModal.aspx

<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">
</asp:ToolkitScriptManager>
<div>
    <ajax:UpdatePanel ID="updPnl" runat="server">
        <ContentTemplate>
            <asp:LinkButton ID="btnModalSubmit" runat="server" Text="Modal Server Submit" />
            <div>
                The current time is:
                <%= Now.ToString%></div>
        </ContentTemplate>

    </ajax:UpdatePanel>
</div>
</form>

It seems to me that by calling .load() on the jquery dialog, it causes havoc with the updatepanel (ie. postback path). How can I load an entire .net page in a modal, click a button in said modal, that posts back to server (asynchronously), and allows me to continue working in my Main page once the modal is dismissed?

Is this even possible? Is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:32:24+00:00Added an answer on June 11, 2026 at 10:32 am

    You can have only one Form runat=server in a aspx file.
    Make you modal to load in an iframe and this should solve a problem. (Assuming it already does not load it like that)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamic page built with jQuery. Html pieces are loaded from mustache
have 2 questions : A computer with 32-bit address uses 2-level page table (9
Using MSVC2010... I have a struct that wraps a std::string, with standard move ctor's
I have a text editor that uses code almost identical to the below for
I have created an application using Netbeans 6.9. In the application I want that
I have a standalone (3rd party) app that I'm trying to launch using a
suppose I have following test/ Main.py test/one/ One.py test1.txt test/two/ Two.py test2.txt What I
Basicily i have a index.html shown below.. <html> <head> <title>UI Test: Main Menu</title> <script
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.