473,698 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change Page Background Image programmaticall y

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 3345
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.co m

"ron" <an*******@disc ussions.microso ft.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 imageappropriatel y.

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

"ron" <an*******@disc ussions.microso ft.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
14767
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 versions for display under hover, which I would like to control via CSS. When on a page, the tab should be just an image rather than a link with hover sensing, so that is probably easy to just use <img> rather than <div> there.
4
44328
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 url(../images/homepagebg3.jpg) no-repeat; font:normal 90% Arial, Helvetica, sans-serif; color:#263158;}
3
7155
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
4539
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 are hovered over I want them to be coloured in. I thought the easiest way to do this would be to change the background image of the entire map (since it's a bit of a pain trying to select each piece out of the image and
4
3132
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 know I can create a new master page, but I'd like to just change the master page from the content page if possible. thanks!
3
3188
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 single column of a table in Jsp. Any clues. Any link for any good javascript html jsp site where i can find some good solution. here swaping hiding which will work well.
1
3144
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 information is). I've got the product name at the top, left aligned and typically as a two lined header, and I'd like to add a small logo to the right of that, either right beside it, or in the far right corner. could anyone help me with how to set...
1
2672
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, but I can not get the left-border and right-border of the box working using div. Anybody can help me? Thanks in advance
0
2869
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 attempts I have made have just gave me an error. <?xml version="1.0" encoding="ISO-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output...
0
8598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8887
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7709
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.