.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

how can i use stylesheet file on pages that derives from masterpage

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

Hello. i use masterpage on my project. i want to add stylesheet file on pages that derives from masterpage. I add default.aspx page like this:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="styles/salon.css" rel="s." type="text/css" />

But i can't see design page like this. It gives error like this:
Error 1 Cannot switch views: Validation (Internet Explorer 6): Element 'link' cannot be nested within element 'div'. 

i use IE7. Also how can i use jquery pages that derives from masterpage. Thanks...


View Complete Post

More Related Resource Links

Parser Error Message: Could not load type MasterPage File



Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.

Source Error:

Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Wam.master.cs" Inherits="wamsilverlight.Web.Wam" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Wam.Master    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927


All of the following have been tried over and over again:

1.) Delete all existing .dlls

2.) Delete MasterPage File and recreate it.

3.) Delete MasterPage perform a c

CSS stylesheet in ascx file

This may be a stupid question, but I can't seem to get my ascx file for my user control to recognize a class in my stylesheet. I put the link at the top of the ascx file, but I'm new to user controls and not sure if this isn't working because I don't have <head></head> section at the top like aspx pages do. Or maybe I'm trying to get something to work that won't work, but I'd like to reference a CssClass on my linkbutton in the user control. I can, however, put a <style></style> section in the ascx page and it works fine, but I'd like to keep all of this in one css file and not have my styles spread out over many pages in case I ever have to make a change in the future. Thanks in advance! Chad

Masterpage with header and footer and buttons on header to change between silverlight and asp pages.

Hi, I would like to create a master page with a header and footer. The header contains buttons which call either an ASP page or Silverlight page. I want to be able to select a page and the relevant page is loaded. The problem I am facing is that the footer does not dock to the bottom unless I include a fixed height. Can someone help as to the best way of doing this. I am not sure if I need to use a masterpage for this or just a simple page? The following is my code on the master page:<head runat="server"> <title>Staff Profiles</title> <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder> <link href="CSS/mainpage.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server" > <div id="container"> <div class="mainHeader" align="center"> <table width="920" height="120" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="10" rowspan="2"><img src="images/Header_01.jpg" alt="" width="10" height="120" /></td>

classic asp pages as the masterPage of an asp.net 2.0 page

hiya folks,I'm upgrading a classic asp app that contains include files as a kind of masterPage, eg  topMenu.asp etc.I want to plug and aspx child page into the app with as little alteration as possible...Simply including the asp pages in the aspx page doesn't work, as asp.net 2.0 obviously tries to "handle" the classic asp page, and it errors.<<CS1010: Newline in constant>>  .. i believe because c# is trying to interpret the VB server side code.So, how can I plug the classic asp stuff in as easily as possible?many thanks,yogi




<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
WIDTH="550" HEIGHT="400" id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"


Multiple same ID on different pages - one CSS file



I`s my first post so hello to everybody.

I am fresh to web programming and I have a questions.

In my project I have few pages. On two of them I have <div> s, inside of which I have textboxes. The Id`s of the <DIV>s are the same, and I don`t want to change them because they are giving me information about what Div is it.

Ofcourse, as they are in different web pages, thy need to have a different style.

How to deal with it in the CSS file? Is that possible e.g. to create a class e.g. "Page1", and assign a style to Id`d inside that class??



Static "forms" used as a background to the XPS fixed pages to cut down the time to create XPS file



with Postscript I can define a resource (a static reusable form in this case) and reference that resource on any page I chose without having to recreate all the drawing instructions stored in that form resource.

How would I be able to do something similar with XPS?  Can I create a grouping of UIElements (drawing / text / image) as a resource stored at the FixedDocument level and then just include a reference to that resource on specific FixedPages?

Would seem illogical in the XPS file format to not be able to merge a single resource on the fixed pages which is a group of static UIElements which appear exactly the same on each of those pages.  Would cut down on repeat elements on every page and should end up with a smaller file size.



Create a hit counter for all pages on a MasterPage


I'd like to track how many visitors I get in each page on my website (entirely coded with .aspx pages). I'm not very familiar with ASP.NET, but I'm sure that it has an easier way to count each page's hits than putting code on each one of my .aspx pages. I assume that this "way" is using the MasterPage I already use. Am I wrong or correct?

I'm using Visual Studio 2010. How shall I proceede?<

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

High Performance ASP.NET - Speeding Up ASP.NET Pages

have been writing a series of blog posts, which I have named High Performance ASP.NET Websites Made Easy! There is no rhyme or reason to the order of these posts and certainly can be read in any order:

Developing High Performance and Scalable ASP.NET Websites
Avoid Chatty Interfaces Between the Tiers in Your ASP.NET Web Application
ASP.NET Page Profiling - Page Tracing - High Performance and Scalable ASP.NET Websites Made Easy
Web Applications: N-Tier vs. N-Layer - Benefits and Trade-Offs
Query Analyzer - Sql Server Database Indexes and Execution Plans

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Master Pages in MOSS 2007

'MasterPages' feature in sharepoint 2007 makes the entire customization job easy.In 2003 we used to face lot of issues to get the same look and feel and the standard behaviour for overall site. In 2007, customizing the look and feel for the entire site can be done in a simple way by using 'MasterPage' feature.

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend