与主页无关的asp webform是拉主页包含文件

时间:2011-05-24 11:45:35

标签: asp.net app-themes

在我的asp.net Web应用程序中,我创建了一个新的Web表单(没有母版页)。此页面的代码如下所示:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchPreload.aspx.cs" Inherits="CMS.ContractManagement.SearchPreload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>

</body>
</html>

然而,当我查看页面时,我有一个背景图片,当我在页面上查看视图源时,我可以看到:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><link href="../App_Themes/basic/ChangePasswordExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/CreateUserWizardExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/DataListExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/DetailsViewExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/ExamplesMaster.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/FormViewExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/GridViewExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/LoginExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/LoginStatusExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/MainMaster.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/MenuExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/PasswordRecoveryExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/SrcViewer.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/TreeViewExample.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/basic/WhitePaper.css" type="text/css" rel="stylesheet" /></head>
<body>

</body>
</html>

这是从哪里来的,我该如何删除它?这个页面只用于做一些数据库操作,并写出一个javascript数组,用于输入jQuery函数。

1 个答案:

答案 0 :(得分:1)

您是否已将网站设置为使用web.config中的App_Themes?如果是这样,那么它会自动将所有样式表添加到所有.aspx页面。

检查您的web.config是否为<page theme="">