hi, i've got a problem in asp.net

i am using a master page with standard headers and footers in all the child pages.

i've given the links of the header image in a cssstyle sheet
and linke the style sheet in aspx master page,

but how to include the header image and footer image in master page in asp.net scripting like we do <? PHP include /"header.jpg"; ?> in php

img html tag or Image asp.net server control.

<img src="Images/image1.gif" alt="image"/>
 //OR
<asp:Image id="img1" runat="server" ImageUrl="~/Images/image1.gif"/>

hi, i've got a problem in asp.net

i am using a master page with standard headers and footers in all the child pages.

i've given the links of the header image in a cssstyle sheet
and linke the style sheet in aspx master page,

but how to include the header image and footer image in master page in asp.net scripting like we do <? PHP include /"header.jpg"; ?> in php

<script type="text/javascript">
window.onload = function () {
    var header = document.getElementById('header');
    var pictures = new Array('images/image1.jpg','images/image2.jpg','images/image3.jpg','images/image4.jpg','images/image5.jpg');
    var numPics = pictures.length;
    if (document.images) {
        var chosenPic = Math.floor((Math.random() * numPics));
        header.style.background = 'url(' + pictures[chosenPic] + ')';
    }
}
</script>
<script type="text/javascript">
window.onload = function () {
    var header = document.getElementById('header');
    var pictures = new Array('images/image1.jpg','images/image2.jpg','images/image3.jpg','images/image4.jpg','images/image5.jpg');
    var numPics = pictures.length;
    if (document.images) {
        var chosenPic = Math.floor((Math.random() * numPics));
        header.style.background = 'url(' + pictures[chosenPic] + ')';
    }
}
</script>

Are u changing the header dynamically every time when window is loading?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.