Change Page Background Image programmatically

  • Thread starter Thread starter ron
  • Start date Start date
R

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
 
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,
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 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]
- (e-mail address removed)

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


.
 
Back
Top