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. Web Development
  3. Changing Background image at run time

Changing Background image at run time

Scheduled Pinned Locked Moved Web Development
csharphtmlasp-nettutorial
2 Posts 2 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.
  • E Offline
    E Offline
    EEmaan
    wrote on last edited by
    #1

    Hi! i want to change background of my web form at run time using C# code in Asp.net web application. By using HTML tags i can do it like using "document.body.background" but i want to know how to use it in C#. Thanx

    L 1 Reply Last reply
    0
    • E EEmaan

      Hi! i want to change background of my web form at run time using C# code in Asp.net web application. By using HTML tags i can do it like using "document.body.background" but i want to know how to use it in C#. Thanx

      L Offline
      L Offline
      L Viljoen
      wrote on last edited by
      #2

      Hi, I worked with similar tech lately so I might be able to help you. Write the javascript needed to change the background image, then you can call it in the server side code, say on a button click { Response.Write(""); //Open Scrip Tags Response.Write("changeBackImage(\""+myImgUrl+"\");"); //Call JavaScript Method Response.Write(""); //Close Script Tag } You might need to play around in it Hope this helps Oliekrokenosterpikkelikkeastrysvoel

      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