Главная страница
<!DOCTYPE html>
<html dir ="rtl">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="menu">
<center>
<table border="1" style="border-color:black">
<tr>
<th style="height:39px">
<a href="Register.aspx">Sign up</a>
<a href="Login1.aspx">Sign in</a>
</th>
</tr>
</table>
</center>
</div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Регистрация
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>טופס רישום</title>
<link rel="stylesheet" type="text/css" href="StyleSheet1.css" /><style type="text/css">
.auto-style4 {
width: 27px;
}
</style><script lang="javascript" type="text/javascript" dir="rtl">
function checkForm() {
var allCheck = true;
if (!checkUserName()) allCheck = false;
if (!checkPassword()) allCheck = false;
if (!checkValidPassword()) allCheck = false;
if (!checkEmail()) allCheck = false;
if (!checkPhone()) allCheck = false;
return allCheck;
}
function checkUserName() {
var flag = true;
var n = document.getElementById("username").value;
if (n == "") {
document.getElementById("mUsername").value = "חובה שם משתמש!";
document.getElementById("mUsername").style.display = "inline";
flag = false;
}
else {
document.getElementById("mUsername").style.display = "none";
if (n.length >= 1 && n.length < 5) {
document.getElementById("mUsername").value = "שם משתמש קצר מדי, 4 תווים לפחות!";
document.getElementById("mUsername").style.display = "inline";
flag = false;
}
else {
document.getElementById("mUsername").style.display = "none";
}
}
}
function checkPassword() {
var flag = true;
var n = document.getElementById("mPass").value;
if (n == "") {
document.getElementById("mPass").value = "חובה להכניס סיסמה!";
document.getElementById("mPass").style.display = "inline";
flag = false;
}
else {
document.getElementById("mPass").style.display = "none";
if (n.length >= 1 && n.length < 6) {
document.getElementById("mPass").value = "סיסמה קצרה מדי, 6 תווים לפחות!";
document.getElementById("mPass").style.display = "inline";
flag = false;
}
else {
document.getElementById("mPass").style.display = "none";
}
}
}
function checkValidPassword() {
var flag = true;
var n1 = document.getElementById("pass").value;
var n2 = document.getElementById("passCheck").value;
if (n1 != n2) {
document.getElementById("mPassCheck").value = "הסיסמאות אינן תואמות!"
document.getElementById("mPassCheck").style.display = "inline";
}
else {
if (n2 == "") {
document.getElementById("mPassCheck").value = "יש לאמת סיסמאות!";
document.getElementById("mPassCheck").style.display = "inline";
flag = false;
}
}
}
function checkEmail() {
var flag = true;
var e = document.getElementById("email").value;
if ((e.indexOf('@') < 2) || e.lastIndex('.') < e.indexOf('@'))
{
document.getElementById("mEmail").value = "!כתובת מייל אינה נכונה";
document.getElementById("mEmail").style.display = "inline";
}
else {
document.getElementById("mMail").style.display = "none"
var status = false;
for (i = 0; i < e.length; i++) {
if (e.charAt(i) == " ") status = true;
}
}
if (status == true)
{
document.getElementById("mMail").value = "!כתובת אימייל אינה נכונה";
document.getElementById("mMail").style.display = "inline";
flag = false;
}
}
function checkPhone() {
var flag = true;
var p = document.getElementById("number").value;
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form id="regist" runat="server" method="post" onsubmit="return checkForm()">
<div id="דף הרשמה">
<center>
<table class="blueTable">
<thead>
<tr class="table.blueTable tr:nth-child(even)">
<th colspan="2" class="table.blueTable th">טופס רישום</th>
</tr>
</thead>
<tr class="">
<td class="table.blueTable td"><b>:שם פרטי</b></td>
<td><input type="text" id="firstname" name="firstname" size="15" class="defaultTextBox" /></td>
</tr>
<tr>
<td><b>שם משפחה</b>:</td>
<td><input type="text" id="familyname" name="familyname" class="defaultTextBox" size="15" /></td>
</tr>
<tr>
<td><b>שם משתמש</b>:</td>
<td><input type="text" id="username" name="username" class="defaultTextBox" size="10" /></td>
<td><input type="text" name="mUsername" id="mUsername" style="display:none;
background-color:Black; color:azure; font-weight: bold;" disabled="disabled" class="defaultTextBox" size="25" /></td>
<td></td>
</tr>
<tr>
<td><b>תאריך לידה:</b></td>
<td><input type="text" id="birthyear" name="birthyear" size="4" value="הזן שנה" />
<select name="month" id="month" class="select">
<option value="0" selected="selected" >בחר חודש</option>
<option value="1">ינואר</option>
<option value="2">פברואר</option>
<option value="3">מרץ</option>
<option value="4">אפריל</option>
<option value="5">מאי</option>
<option value="6">יוני</option>
<option value="7">יולי</option>
<option value="8">אוגוסט</option>
<option value="9">ספטמבר</option>
<option value="10">אוקטובר</option>
<option value="11">נובמבר</option>
<option value="12">דצמבר</option>
</select>
<select name="days" id="days">
<option value="d" selected="selected" >בחר יום</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</td>
</tr>
<tr>
<td><b>סיסמה:</b></td>
<td><input type="password" id="pass" name="pass" size="10" class="defaultTextBox" /></td>
<td><input type="text" name="mPass" id="mPass" style="display:none;
background-color:Black; color:azure; font-weight: bold;" disabled="disabled" class="defaultTextBox" size="25" /></td>
</tr>
<tr>
<td><b>אימות סיסמה:</b></td>
<td><input type="password" id="passCheck" name="passCheck" size="10" class="defaultTextBox" /></td>
<td><input type="text" name="mPassCheck" id="mPassCheck" style="display:none;
background-color:Black; color:azure; font-weight: bold;" disabled="disabled" class="defaultTextBox" size="25" /></td>
</tr>
<tr>
<td><b>אימייל:</b></td>
<td><input type="text" id="email" name="email" size="30" class="defaultTextBox" /></td>
<td><input type="text" name="mEmail" id="mEmail" style="display:none;
background-color:Black; color:azure; font-weight: bold;" disabled="disabled" class="defaultTextBox" size="25" /></td>
</tr>
<tr>
<td><b>מספר טלפון:</b></td>
<td><input type="number" id="number" name="number" size="7" />
<select name="kidomet" id="kidomet">
<option value="k" selected="selected" >קידומת</option>
<option value="2">052</option>
<option value="8">058</option>
<option value="4">054</option>
<option value="0">050</option>
</select>
</td>
</tr>
<tr>
<td>גובה:</td>
<td><input type="number" id="height" name="height" size="3" class="defaultTextBox" /></td>
</tr>
<tr>
<td><b>מין:</b></td>
<td><select name="profession" id="profession">
<option value="g" selected="selected" >בחר מין</option>
<option value="m">זכר</option>
<option value="f">נקבה</option>
<option value="o">אחר</option>
</select>
</td>
</tr>
<tr>
<td><b>הערות:</b></td>
<td><textarea cols="15" rows="10" name="notes" id="notes" class="advancedSearchTextbox">הערות:</textarea></td>
</tr>
<tr>
<center>
<td colspan="2">                                         <input type="submit" value="שלח" id="submit" name="submit"/>    
<input type="reset" value="נקה" id="clean" name="submit"/></td>
</center>
</tr>
</table>
</center>
</div>
</form>
</asp:Content>
Я использую главную страницу, и когда я пытаюсь выполнить код я получаю следующую ошибку:
Страница может иметь только один тег формы на стороне сервера.
У меня есть тег формы и код на стороне сервера как в реестре, так и на главных страницах. Я не мог понять, что я должен сделать, чтобы решить эту ошибку?