473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Change Page Background Image programmatically

ron
Hi,
I have a page where i would like like to change the
background image depending on the 'Request.Params'
received value in the code behind.
There are three different image that can be loaded.
What is the best way to do this?

I have been trying to do this using the Tables Styles
class but have had no luck referencing the Style sheet
and placing making the Table.Style properties equal to
the proper class in my style sheet.

Thanks Ron
Nov 15 '05 #1
2 3331
Ron,

Why not just insert a <style> tag yourself based on the content of the
parameters that are passed into you? You can define a tag on your page (or
in a base class), which will set the style and then set the background image
appropriately.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ron" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
Hi,
I have a page where i would like like to change the
background image depending on the 'Request.Params'
received value in the code behind.
There are three different image that can be loaded.
What is the best way to do this?

I have been trying to do this using the Tables Styles
class but have had no luck referencing the Style sheet
and placing making the Table.Style properties equal to
the proper class in my style sheet.

Thanks Ron

Nov 15 '05 #2
ron
Nicholas,
Could you please show me an example?
Becuase i have been trying to do just that I think..

Thanks Ron

-----Original Message-----
Ron,

Why not just insert a <style> tag yourself based on the content of theparameters that are passed into you? You can define a tag on your page (orin a base class), which will set the style and then set the background imageappropriately.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ron" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
Hi,
I have a page where i would like like to change the
background image depending on the 'Request.Params'
received value in the code behind.
There are three different image that can be loaded.
What is the best way to do this?

I have been trying to do this using the Tables Styles
class but have had no luck referencing the Style sheet
and placing making the Table.Style properties equal to
the proper class in my style sheet.

Thanks Ron

.

Nov 15 '05 #3

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

Similar topics

1
by: David T-G | last post by:
Hi! Please be gentle; I'm new to ciwas and CSS in general, and know little to no javascript (but that might win me points here ;-) I have nine 'tab' images, with corresponding high-background...
4
by: Nathan Given | last post by:
Hello All, I am trying to randomly change the background image of my home page but I can't seem to figure it out. Here is a snippet of my css .... BODY {background:transparent...
3
by: bigoxygen | last post by:
Hi. I have a list that is similar to this: -Evaluation +test +test -Students +test I would like to change the "-" bullet only, but I cannot. My
2
by: chris_culley | last post by:
Hi there, I've got a gif with (highly) irregular shapes (lots of jigsaw pieces) that I want to map so that each piece is a link... The pieces are currently just a frame drawing, but as they...
4
by: David Lozzi | last post by:
Howdy, I have my master page, and I would like to change the background CSS class per the content page. Only the home page has a different background style, all other pages are using the same. I...
3
by: vj | last post by:
how to change images based on action. Even clicking changed images should do respective actions. and while displaying only one image at a time sholud get displayed. I am using three images for a...
1
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important...
1
by: rockdale | last post by:
Hi, all I am change my webpage to using div and css for my layout, it was using table before and I want to get rid of it. Basically it draws a box around my content using background pictures,...
0
by: cleary1981 | last post by:
Hi, Heres my xsl stylesheet. Its work in progress but it works. What I want to do however is to make one page in the middle (drawings) a landscape page. Can anyone explain how to do this as all...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.