Solved

Pre-set formatting on asp.net pages.

Posted on 2014-01-28
1
391 Views
Last Modified: 2014-01-28
I am newish to Asp.net. I have inherited a web application project. When I create a new page it already has some formatting on the top even though I don't use any master page when creating the page. This I can see when I build the page. I am using ASP.Net 4.0, C# language.

You can see the formatting here at:

http://imgur.com/0z5wnjM

For the life of me I cant figure out as in the underlying code for the file there is no reference to any css or any elements. The code for page.aspx is as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
<!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>

Open in new window


The code behind is as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

Open in new window


Here is the rendered code:

The rendered code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">; <html xmlns="w3.org/1999/xhtml">; <head><title> </title><link href="App_Themes/Default/flexslider.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Default/PublicStyle.css" type="text/css" rel="stylesheet" /></head> <body> </body> </html> – 

Open in new window



Thanks in advance for any help I can get.
0
Comment
Question by:JonhDonogan
1 Comment
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 39815080
From:
stackoverflow.com/questions/4905999/prevent-asp-net-themes-from-auto-adding-css-files

Try adding this to your <%@ Page> Directive

EnableTheming="false" Theme="" StylesheetTheme=""

It could be the website is using a theme which is automatically adding those CSS files for you.

More on themes:
http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Loop not working 29 48
Problem of RegEx to match the first occurence of 10 37
DateTimepicker 4 33
Runtime Error 2 29
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now