How to change Background Image

Discussion in 'ASP .Net' started by Bobofrut, Feb 27, 2004.

  1. Bobofrut

    Bobofrut Guest


    In my ASP.NET application I try to change dynamicly picture in background of
    Ther is any way to do it without using webcontrols(like panel)
    I wrote the public function named getName() that return string "pic\1.jpg"
    and put this into html tag
    <body background="<%# getName()%>" bottomMargin=0 leftMargin=0 topMargin=0
    but it doesn't work.

    please help

    Bobofrut, Feb 27, 2004
    1. Advertisements

  2. Bobofrut

    Rajiv R Guest

    Rajiv R, Feb 27, 2004
    1. Advertisements

  3. Bobofrut

    Jos Guest

    <%= getName()%>

    Use = , not #.

    The hash sign is used for databinding syntax, which will be executed
    only when the DataBind() method is called.

    The <%= %> code is run when the page is rendered.
    Jos, Feb 27, 2004
  4. Bobofrut

    Bobofrut Guest

    Thanks a lot ...
    It was realy easy

    Bobofrut, Feb 27, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.