Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to call a form to be displayed in main content of a page without page reload
    primarykey
    data
    text
    <p>I have a page that is based on my master page. the code below</p> <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CaseAdmin.aspx.cs" Inherits="Prototype4.CaseAdmin" %&gt; &lt;%@PreviousPageType VirtualPath="~/Account/Login.aspx"%&gt; &lt;asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="CaseRightNews" ContentPlaceHolderID="RightNewsItem" runat="server"&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="CaseLeftNav" ContentPlaceHolderID="LeftNavigation" runat="server"&gt; &lt;div style="margin-top:20px; margin-bottom:20px;"&gt; &lt;p class="actionButton"&gt;&lt;asp:LinkButton ID="OpenCaseLinkButton" runat="server" onclick="OpenCaseLinkButton_Click"&gt;Open Case&lt;/asp:LinkButton&gt; &lt;/p&gt; &lt;p class="actionButton"&gt;&lt;asp:LinkButton ID="RegisterExhibitLinkButton" runat="server"&gt;Register Exhibit&lt;/asp:LinkButton&gt; &lt;/p&gt; &lt;/div&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="CaseMainContnt" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;/asp:Content&gt; </code></pre> <p>when the page above loads, i have link buttons on the left and an empty maincontent area next to its right. what i want to do is display an entry form in the main content on click event of the link button on the left. the second form is as below.(form not based on master page).</p> <pre><code> &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenCase.aspx.cs" Inherits="Prototype4.EntryForms.OpenCase" %&gt; &lt;%@PreviousPageType VirtualPath="~/CaseAdmin.aspx" %&gt; &lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;style type="text/css"&gt; .casePage { width: 430px; height:314px; background-color:#3a4f63; } .style1 { font-weight: normal; color: #FFFFFF; text-align: center; } .style2 { font-weight: normal; color: Black; text-align: left; margin-left: 20px; margin-top:0px; } .style3 { width: 85%; } .style4 { width: 175px; background-color: #808080; } .style5 { background-color: #CCCCCC; padding-left:10px; } &lt;/style&gt; &lt;/head&gt; &lt;body class="casePage"&gt; &lt;form id="form1" runat="server"&gt; &lt;div style="height: 313px; width: 430px"&gt; &lt;h2 class="style1"&gt; &lt;strong&gt;Open Case Form&lt;/strong&gt;&lt;/h2&gt; &lt;div style="width: 426px; margin-bottom:20px;"&gt; &lt;table class="style3" align="center"&gt; &lt;tr&gt; &lt;td class="style4"&gt; &lt;p class="style2"&gt; Case ID: &lt;/p&gt; &lt;/td&gt; &lt;td class="style5"&gt; &lt;asp:TextBox ID="caseIDTextBox" runat="server" height="22px" width="154px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="style4"&gt; &lt;p class="style2"&gt; Case Description: &lt;/p&gt; &lt;/td&gt; &lt;td class="style5"&gt; &lt;asp:TextBox ID="caseDescTextBox" runat="server" height="22px" width="154px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="style4"&gt; &lt;p class="style2"&gt; Case Administrator ID: &lt;/p&gt; &lt;/td&gt; &lt;td class="style5"&gt; &lt;asp:TextBox ID="caseAdminIDTextBox" runat="server" height="22px" width="154px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;div&gt; &lt;table class="style3" align="center"&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;asp:Button ID="openCaseBotton" runat="server" Text="Open Case" onclick="openCaseBotton_Click" /&gt; &lt;/td&gt; &lt;td&gt; &amp;nbsp;&lt;/td&gt; &lt;td align="center"&gt; &lt;asp:Button ID="addExhibitBotton" runat="server" Text="Add Exhibit" onclick="addExhibitBotton_Click" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>how do i perform this task?</p> <p>and if i wanted to display a different form in place of the first one that appeared in the maincontent area, how do i go about it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload