如何解决html错误问题? [英] how to solve html error problem?

查看:57
本文介绍了如何解决html错误问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我在Asp.net表单中遇到问题,当我开始调试代码时,出现此消息:

错误100类型或名称空间名称"global_asax"在名称空间"ASP"中不存在(您是否缺少程序集引用?)

错误101类型或名称空间名称"DataAnnotations"在名称空间"System.ComponentModel"中不存在(您是否缺少程序集引用?)

以及在代码页和HTML页中都无法识别任何其他Asp.net控制对象(文本框,下拉列表,..):
错误102名称"personlCodeTextBox"在当前上下文中不存在

错误103名称"SerialNumTextBox"在当前上下文中不存在
错误104名称``nationalNumTextBox''在当前上下文中不存在
错误105名称"PassNumTextBox0"在当前上下文中不存在


同时我的表单位于母版页中.


这是我的代码:

Hi.

i have a problem in my Asp.net form , when i start to debug the code this message appears :

Error 100 The type or namespace name ''global_asax'' does not exist in the namespace ''ASP'' (are you missing an assembly reference?)

Error 101 The type or namespace name ''DataAnnotations'' does not exist in the namespace ''System.ComponentModel'' (are you missing an assembly reference?)

and also any other Asp.net Control Objects(textbox,dropdownlist,..)are not recognized either in code page and in Html page:
Error 102 The name ''personlCodeTextBox'' does not exist in the current context

Error 103 The name ''SerialNumTextBox'' does not exist in the current context
Error 104 The name ''nationalNumTextBox'' does not exist in the current context
Error 105 The name ''PassNumTextBox0'' does not exist in the current context


meanwhile my form is located in a master page.


and this is my code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Page1.Master" AutoEventWireup="true" CodeBehind="~/GeneralInfo.aspx.cs" Inherits="Marashi.GeneralInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <style type="text/css">
        .style1
        {
            height: 26px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form action="GeneralInfo.aspx" method="post" id="Form1">
  <div id="div1" dir="rtl"  runat="server">
     <asp:ScriptManager EnableHistory="true" ID="ScriptManager1" runat="server"></asp:ScriptManager>
          <asp:UpdatePanel UpdateMode="Always" ID="UpdatPanel1" runat="server">
             <ContentTemplate>

                 <table style="width:100% ; overflow:hidden;table-layout:fixed" >
                     <tr>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                         <td class="style1" dir="rtl" height="35">
                             </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label1" runat="server" Text="نام :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="FirstNameTextBox" runat="server" 

                                 Text='<%# Bind("FirstName", "{0}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label2" runat="server" Text="نام خانوادگی :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="LastNameTextBox" runat="server" 

                                 Text='<%# Bind("LastName", "{0}") %>' Width="145px" ></asp:TextBox>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label3" runat="server" Text="نام پدر :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="FatherNameTextBox" runat="server" 

                                 Text='<%# Bind("FatherName", "{0}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label4" runat="server" Text="شماره پرسنلی :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="personlCodeTextBox" runat="server" 

                                 Text='<%# Bind("PersonelCode", "{0:N}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                             <asp:RangeValidator ID="RangeValidator2" runat="server" 

                                 ControlToValidate="personlCodeTextBox" ErrorMessage="RangeValidator" 

                                 MaximumValue="4" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                         </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label5" runat="server" Text="کشور محل تولد :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:DropDownList ID="CountryDrpDown" runat="server" Width="145px" AutoPostBack="true">
                             </asp:DropDownList>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label6" runat="server" Text="شهر محل تولد :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:DropDownList ID="CityDrpDown" runat="server" Width="145px" AutoPostBack="true">
                             </asp:DropDownList>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label7" runat="server" Text="محل صدور شناسنامه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:DropDownList ID="SodorCityDrpDown" runat="server" Width="145px" AutoPostBack="true">
                             </asp:DropDownList>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label8" runat="server" Text="شماره شناسنامه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="SerialNumTextBox" runat="server" 

                                 Text='<%# Bind("SerialNumber", "{0:N}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label9" runat="server" Text="شماره ملی :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="nationalNumTextBox" runat="server" 

                                 Text='<%# Bind("NationalNumber", "{0:N}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label22" runat="server" Text="تاریخ تولد :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="BirthDateTextBox" runat="server" 

                                 Text='<%# Bind("BirthDate_S", "{0:d}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label11" runat="server" Text="جنسیت :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:RadioButtonList ID="GendeRadioBtn" runat="server" selectedIndex='<%#Bind("Gender") %>'

                             selectedValue='<%#Bind("Gender")%>' RepeatDirection="Horizontal" AutoPostBack="true" >
                             <asp:ListItem Selected="True">مرد</asp:ListItem>
                             <asp:ListItem>زن</asp:ListItem>
                             </asp:RadioButtonList></td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label10" runat="server" Text="شماره گذرنامه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="PassNumTextBox0" runat="server" 

                                 Text='<%# Bind("PassportNumber", "{0:N}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label13" runat="server" Text="نظام وظیفه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:DropDownList ID="DropDownMilitary" runat="server" 

                                 AppendDataBoundItems="True" AutoPostBack="True" 

                                 SelectedValue='<%# Bind("MilitaryStatusId", "{0}") %>' Width="100px">
                                 <asp:ListItem>انجام داده ام </asp:ListItem>
                                 <asp:ListItem>در حال خدمت </asp:ListItem>
                                 <asp:ListItem>معافیت دائم</asp:ListItem>
                                 <asp:ListItem>معافیت موقت </asp:ListItem>
                             </asp:DropDownList>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label12" runat="server" Text="وضعیت تأهل :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:RadioButtonList ID="MaryRadio" runat="server" 

                                 RepeatDirection="Horizontal" 

                                 SelectedValue='<%# Bind("MaritalStatus", "{0}") %>'>
                                 <asp:ListItem>مجرد</asp:ListItem>
                                 <asp:ListItem>متأهل</asp:ListItem>
                             </asp:RadioButtonList>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label14" runat="server" Text="تابعیت :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="NationalityTextBox" runat="server" 

                                 Text='<%# Bind("Nationality", "{0}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label17" runat="server" Text="تلفن ثابت :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="PhoneTextBox0" runat="server" 

                                 Text='<%# Bind("Phone") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label18" runat="server" Text="تلفن همراه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="MobileTextBox1" runat="server" 

                                 Text='<%# Bind("Mobile") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label20" runat="server" Text="کد پستی :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="PostalCodeTextBox" runat="server" 

                                 Text='<%# Bind("PostalCode", "{0:N}") %>' Width="145px"></asp:TextBox>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label19" runat="server" Text="رایانامه :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35">
                             <asp:TextBox ID="EmailTextBox1" runat="server" 

                                 Text='<%# Bind("Email", "{0}") %>' Width="145px" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                             <asp:Label ID="Label21" runat="server" Text="آدرس منزل :"></asp:Label>
                         </td>
                         <td dir="rtl" height="35" colspan="3">
                             <asp:TextBox ID="AddressTextBox" runat="server" 

                                 Text='<%# Bind("HomeAddress", "{0}") %>' Width="545px"></asp:TextBox>
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                             <asp:Button ID="Button1" runat="server" onclick="SubmitButton" Text="Button" />
                         </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                     <tr>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                         <td dir="rtl" height="35">
                              </td>
                     </tr>
                 </table>

             </ContentTemplate>
          </asp:UpdatePanel>

  </div>
</form> 
</asp:Content>

推荐答案

You need to post code, we need to see what line has this error. There is a global.asax. but not a global_asax class.
You need to post code, we need to see what line has this error. There is a global.asax. but not a global_asax class.


这篇关于如何解决html错误问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆