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 7873913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:39:12+00:00 2026-06-03T02:39:12+00:00

Situation: I have a master page which has 3 content place holder but no

  • 0

Situation: I have a master page which has 3 content place holder but no form runat server.
In my Login.aspx I try to fill those place holders but it does’t allow me without form runat server tag and once I add more than one form again it shows me :”A page can have only one server-side Form tag.”

here is my code :

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="DWDS_Lotus_Care_Final.Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <form id="formUser" runat="server">
            <p>
                <asp:Label ID="lblUsername" runat="server" Text="Username"></asp:Label>
                <asp:Button ID="btnLogout" runat="server" Text="Logout" />
            </p>
    </form>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <table style="width: 100%">
        <tr>
            <td style="width: 93px">
                UserName :
            </td>
            <td style="width: 139px">
        <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
            </td>
            <td style="width: 307px">
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtUserName" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 93px">
                Password :</td>
            <td style="width: 139px">
        <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
            </td>
            <td style="width: 307px">
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtPassword" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="width: 93px">
                &nbsp;</td>
            <td style="width: 139px">
        <asp:Button ID="btnSubmit" Text="Submit" runat="server" 
            onclick="btnSubmit_Click" />
        &nbsp;&nbsp;
        <asp:Button ID="btnClear" Text="Clear" runat="server" 
            onclick="btnClear_Click" />
            </td>
            <td style="width: 307px">
        <asp:LinkButton ID="linkRegister" Text="Register" runat="server"></asp:LinkButton>
            </td>
        </tr>
    </table>
        </p>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">

</asp:Content>

here is the master source

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs"     Inherits="DWDS_Lotus_Care_Final.Site1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <title>Consistent</title>
    <link href="http://fonts.googleapis.com/css?family=Bitter" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
        <div id="wrapper">
        <div id="header">
            <div id="logo">

            </div>
        </div>
            <div id="menu">
                <ul>
                    <li><a href="#">Login</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Portfolio</a></li>
                    <li class="last"><a href="#">Contact</a></li>
                </ul>
            </div>
            <div id="page">



        <%--Here is the sidebar--%>
            <div id="sidebar" style="background-color:#CCCCCC">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                </asp:ContentPlaceHolder>
                    <h3>Links to Other Hospitals</h3>
                    <div class="date-list">
                        <ul class="list date-list">
                            <li class="first"><span class="date">Sunway</span> <a href="#">Sunway Piramid</a></li>
                            <li><span class="date">KPJ</span> <a href="#">Kajang Care Centre</a></li>
                            <li><span class="date">HCC</span> <a href="#">Health Care Center</a></li>
                            <li><span class="date">AlphaH</span> <a href="#">Alpha Health Center</a></li>
                            <li><span class="date">UPC</span> <a href="#">Bangsar Hospital</a></li>
                            <li class="last"><span class="date">TPM</span> <a href="#">Technology Park Hospital</a></li>
                        </ul>
                    </div>
                <br class="clearfix" />
            </div>



            <%--Here is the Content--%>
            <div id="content">
                <h2>Welcome to Lotus Care</h2>

                <div class="box">
                     <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

                     </asp:ContentPlaceHolder>
                </div>
                <div class="box">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">

                     </asp:ContentPlaceHolder>
                </div>
                <br class="clearfix" />
            </div>





            <br class="clearfix" />
        </div>
    </div>
    <div id="footer">
        </div>
</body>

  • 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-03T02:39:14+00:00Added an answer on June 3, 2026 at 2:39 am

    MasterPage:

    <form runat="server">
       <%-- use form tag only in Master page.--%>
     <div id="content">
     <h2>Welcome to Lotus Care</h2>
     <div class="box">
      <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    
      </asp:ContentPlaceHolder>
      </div>
      <div class="box">
      <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
    
      </asp:ContentPlaceHolder>
      </div>
      <br class="clearfix" />
     </div>
    </form>
    

    Content Page:

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <%-- don't use Form tag here..--%>
      <table style="width: 100%">
      </table>
    </asp:Content>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following situation: Page1.aspx is based on a master page and has
I have a master page which contains everything that inherits it within a form.
Situation: I have an index page which loads pages into it with ajax as
If I've got a setup where my master page has a member which is
I have a master page that uses @RenderBody to display the current controller\action content.
I have a Master Page that has two different modes of behavior: strict input
I have following situation - Have a MongoService class, which reads host, port, database
Pseudo-situation: have a class (let's say BackgroundMagic ), and it has Start() and Stop()
I have the following situation on my new ASP.Net page: I am using a
I need to build a web page with a DetailsView which has a bunch

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.