Solved

Pre-set formatting on asp.net pages.

Posted on 2014-01-28
1
385 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 39

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

12 Experts available now in Live!

Get 1:1 Help Now