本文介绍了当我运行错误如下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
源页面代码如下
source page code as follows
<%@ Page Language="C#" MasterPageFile="~/OnlineExamFeedBack/MasterPage.master" AutoEventWireup="true"
CodeFile="Feed_Back.aspx.cs" Inherits="OnlineExamFeedBack_Feed_Back" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<style type ="text/css">
body
{
background-color:White;
}
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=50);
opacity: 0.7;
}
.tdHeader
{
background-image: linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -o-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -moz-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -ms-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -webkit-gradient( linear, left bottom, left top,color-stop(0, rgb(240,216,216)),
color-stop(1, rgb(77,10,10)));
}
</style>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div style="width: 253px">
<table style="width: 835px">
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="Course" Font-Bold="True" ForeColor="Blue">
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label1" runat="server" Text="To What extent was this course useful"
Font-Bold="True">
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcourse" AutoPostBack="true" runat="server"
Width="160px" onselectedindexchanged="ddlcourse_SelectedIndexChanged">
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcourse" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red">
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label2" runat="server" Text="To What extent you acquired sufficient skills"
Font-Bold="True">
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcourseacquired" AutoPostBack="true" runat="server" Width="160px">
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcourseacquired" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red">
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label3" runat="server" Text="To What extent you gained confidence to use the actual equipments on board"
Font-Bold="True">
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcoursegained" AutoPostBack="true" runat="server" Width="160px">
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcoursegained" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red">
</td>
</tr>
</table>
</div>
当我运行错误时如下
该页面包含附加到母版页时无效的标记
请帮助我什么是我的上述源代码页中的问题
问候,
Narasiman P.
when i run error as follows
The page contains markup that is not valid when attached to a master page
please help me what is the problem in my above source page code
Regards,
Narasiman P.
推荐答案
<%@ Page Language="C#" MasterPageFile="~/OnlineExamFeedBack/MasterPage.master" AutoEventWireup="true"
CodeFile="Feed_Back.aspx.cs" Inherits="OnlineExamFeedBack.Feed_Back" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<style type="text/css">
body
{
background-color: White;
}
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=50);
opacity: 0.7;
}
.tdHeader
{
background-image: linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -o-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -moz-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -ms-linear-gradient(bottom, rgb(240,216,216) 0%, rgb(77,10,10) 100%);
background-image: -webkit-gradient( linear, left bottom, left top,color-stop(0, rgb(240,216,216)), color-stop(1, rgb(77,10,10)));
}
</style>
<div style="width: 253px">
<table style="width: 835px">
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="Course" Font-Bold="True" ForeColor="Blue"></asp:Label>
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label1" runat="server" Text="To What extent was this course useful"
Font-Bold="True"></asp:Label>
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcourse" AutoPostBack="true" runat="server" Width="160px"
OnSelectedIndexChanged="ddlcourse_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcourse" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label2" runat="server" Text="To What extent you acquired sufficient skills"
Font-Bold="True"></asp:Label>
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcourseacquired" AutoPostBack="true" runat="server" Width="160px">
</asp:DropDownList>
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcourseacquired" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style1">
<asp:Label ID="Label3" runat="server" Text="To What extent you gained confidence to use the actual equipments on board"
Font-Bold="True"></asp:Label>
</td>
<td style="width: 138px">
<asp:DropDownList ID="ddlcoursegained" AutoPostBack="true" runat="server" Width="160px">
</asp:DropDownList>
<br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" InitialValue="--Select Grading--"
ControlToValidate="ddlcoursegained" ErrorMessage="Select the Grading" Font-Bold="True"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</div>
</asp:Content>
这篇关于当我运行错误如下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!