Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Changing the background

Changing the background

Scheduled Pinned Locked Moved C#
questionasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    razanabanu
    wrote on last edited by
    #1

    im woking with web forms....I would like to change the backround of web form at run time....how can I achieve that?...

    Hi,Im Razana

    M V 2 Replies Last reply
    0
    • R razanabanu

      im woking with web forms....I would like to change the backround of web form at run time....how can I achieve that?...

      Hi,Im Razana

      M Offline
      M Offline
      Malcolm Smart
      wrote on last edited by
      #2

      Hi, I'm Malcolm I thought this was gonig to be easy to answer...but unless somebody wants to make me look stupid, it isn't that straight forward. Try this... Change your <body> tag

      <body id="bodytag" bgColor= "#000099" runat="server">

      and then in the event handler that is called to change the colour (or on PageLoad) call :

      bodytag.Attributes.Add("bgcolor", "#EE33AA");

      obviously setting which ever colour you want. Is there a better / different way anybody? I never change the background color!

      "More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

      1 Reply Last reply
      0
      • R razanabanu

        im woking with web forms....I would like to change the backround of web form at run time....how can I achieve that?...

        Hi,Im Razana

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Style?

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups