[Solved] ASP.Net Error: A page can have only one server-side Form tag

on Feb 15, 2021 04:23 AM


I want use two forms with runat ="server" tag with in one page. I need to hide the second form and open with button click. When I do that error says that"

A page can have only one server-side Form tag.

How can I fix this by using two forms with runat="server" tag?

Also can I know how to open a div frame or Form in different page. (open button is in page 1 and form is in page2,want to open form in page 2 from page 1)

Tell me how to pop up a Div frame in page 2 from a button in page 1


My div is in aspx Page 2

Div id is modalForm1

I want to open modalform1 from aspx page 1

Your help would be greatly appreciated

Thanks & Regards,


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Main CSS-->
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <title>Login - handis IMS Admin</title>
    <section class="material-half-bg">
      <div class="cover"></div>
    <section class="login-content">
      <div class="logo">
        <h1><img src="images/logo-main.png" alt="" /></h1>
      <div class="login-box">
        <form class="login-form" id="form1" runat="server" method ="post">
          <h3 class="login-head"><em class="fa fa-lg fa-fw fa-user"></em>SIGN IN</h3>
          <div class="form-group">
            <label class="control-label">EMAIL</label>
            <asp:TextBox ID="txtEmail" runat="server" Class="form-control" type="Email" placeholder="Enter Email" required />
          <div class="form-group">
            <label class="control-label">PASSWORD</label>
               <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Class="form-control" placeholder="Enter Password" required/>
          <div class="form-group">
            <div class="utility">
              <div class="animated-checkbox">
                       <asp:CheckBox ID="chkRememberMe" Text="" runat="server"/><span class="label-text">Stay Signed in</span>
              <p class="semibold-text mb-2"><a href="#" data-toggle="flip">Forgot Password ?</a></p>
          <div class="form-group btn-container">
                <asp:Button ID="btnLogin" Text="Login" runat="server" OnClick="ValidateUser" class="btn btn-primary btn-block" /> 
              <div id="dvMessage" runat="server" visible="false" class="alert alert-danger">
            <asp:Label ID="lblMessage" runat="server" />
        <form class="forget-form" id="Form9" method = "post"  runat ="server">
          <h3 class="login-head"><i class="fa fa-lg fa-fw fa-lock"></i>Forgot Password ?</h3>
          <div class="form-group">
            <label class="control-label">EMAIL</label>
            <asp:TextBox ID="txtEmailfgt" runat="server" Class="form-control" type="Email" placeholder="Enter Email" required />
          <div class="form-group btn-container">            
                <asp:Button ID="btnReset" Text="RESET" runat="server" OnClick="ResetPassword" class="btn btn-primary btn-block" /> 
          <div class="form-group mt-3">
            <p class="semibold-text mb-0"><a href="#" data-toggle="flip"><i class="fa fa-angle-left fa-fw"></i> Back to Login</a></p>
    <!-- Essential javascripts for application to work-->
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/main.js"></script>
    <!-- The javascript plugin to display page loading on top-->
    <script src="js/plugins/pace.min.js"></script>
    <script type="text/javascript">
      // Login Page Flipbox control
      $('.login-content [data-toggle="flip"]').click(function() {
      	return false;


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Feb 19, 2021 06:58 AM

Hi Dharmendhr,

Thank you for your quick response

With your answer I manged to get a fix from below link


Thank you again for your support. Let me know how I can support you

Thanks & Regards,