Click here to Skip to main content
15,793,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to set background image in a masterpage.

May be its helpful for you

you can attach the css file or
write the code as below...
just provide the path where image is located in url('imagepath')..

thanks :)

<pre lang="xml"><head runat="server">
    <asp:ContentPlaceHolder id="head" runat="server">
    <style type="text/css">

    <form id="form1" runat="server">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Share this answer
Use css

Set this css stylesheet in your master page head
<link rel ="stylesheet" src ="master.css">

And voila. :)
Share this answer
The masterpage is irrelevant in setting of a background image.
The solution is to define an image in a control anywhere.
Since you have a masterpage this may as well be in there. E.g.

<div style="position:fixed; top:0; left:0; background-image:url ('image.png'); z-index:0">


The important thing to note is the position of div and the background Zindex. See if that works.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900