473,491 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Some questions about masterpages.

Hi!

I have created a masterpage, now i have a tree where pages resides because
all visitors should not be able to peek on the private pages.

The masterpage contains

A table, the table contains a background-image.

As long as the pages is where the masterpage is, the images is displayed.
When i create a new page in another folder, the images are not displayed.

I have tried to set the url to ~/images/header.bmp, but it don't work, now
no images are displayed not when files are in the root.

What could be wrong?

Hope you understod what i want to do. My english is a bit poor, i am swedish
:D

Regards
Martin
Nov 24 '05 #1
2 898
does the image have a runat="server" in it? If not ~ is meaningless. ~
only works for server controls.

As an alternative, I'd recommend you use a stylesheet, in which case the
image path will always be reletive to the css

master.master
page1.aspx
page2.aspx
directory\page3.aspx
styles\styles.css
images\blah.gif

if in your master.master you have
<table class="x">...

and in your stylesheet, which is included in your master page, you have

table.x
{
background: url("../images/blah.gif");
}

everything should work fine because it's relative to the location of the
css.
Also, why are you using bmp? :)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Visual Systems AB (Martin Arvidsson)" <ma**************@vsab.net> wrote in
message news:u8**************@tk2msftngp13.phx.gbl...
Hi!

I have created a masterpage, now i have a tree where pages resides because
all visitors should not be able to peek on the private pages.

The masterpage contains

A table, the table contains a background-image.

As long as the pages is where the masterpage is, the images is displayed.
When i create a new page in another folder, the images are not displayed.

I have tried to set the url to ~/images/header.bmp, but it don't work, now
no images are displayed not when files are in the root.

What could be wrong?

Hope you understod what i want to do. My english is a bit poor, i am
swedish :D

Regards
Martin

Nov 24 '05 #2
<snip />

Spend more time learning about 2.0 as there are many new classes and
controls.
You want to learn about the LoginView control and you also want to learn
about Membership, Roles and Profiles.
That is how we can easily make it possible for some users to see pages and
others not be able to see pages. Also, the LoginView makes it possible for
everybody to see a page but some users can see content that others can not
depending on what role the users belong to.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
Nov 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1535
by: Roger Walter | last post by:
When using the MasterPages form Templating from ASP.NET web Controls, and also using another templating process that uses User Controls, I get a border around the entire page when it is rendered...
1
1604
by: nLella | last post by:
I am trying to build a new web application and trying to implement either templates or master pages in it. I tried to read several articles but could not actually deside on weather to go with the...
2
1729
by: clintonG | last post by:
Does anybody know how to use a control such as the DropDownList to change Themes when using MasterPages? I'm also asking in the forum. <%= Clinton Gallagher METROmilwaukee (sm) "A Regional...
4
1507
by: Jeff Lynch | last post by:
I need to call a class on every web page in a site. In ASP.NET 1.1 I would call this class before the Page_Load event in each web page's code-behind file since it needs to run before the web page...
3
1767
by: Lars W. Andersen | last post by:
Hi, I am looking for a good - easy to comprehend little CMS application for my "beginners" asp.net 2.0 site. It must be able to use Access as the database (only a couple of people will be...
5
4298
by: Nick Wouters | last post by:
Dear All In Classic ASP I used CSS for ALL layout. Now in ASP.NET version 2 I am testing out Masterpages as they come in very handy. It seems like it is replacing CSS for layout but what is...
6
1967
by: =?Utf-8?B?U3RlcGhlbiBIYXRmaWVsZA==?= | last post by:
I have two masterpages in a web application. One is used for the login and logout pages. The other is used for all other pages in the application. The difference between the two masterpages is...
8
11763
by: Mort Strom | last post by:
Right now the header of my master page contains all of the CSS styles for all of the pages that might be loaded in my ContentPlaceHolder. The problem is that my <styletag is getting too large to...
10
2102
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the...
0
6980
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.