Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to change background image ??

Reply
Thread Tools

How to change background image ??

 
 
Thomas Johansen
Guest
Posts: n/a
 
      02-23-2004
Hi Chris,

Try adding runat="server" to your BODY tag, and it should work as expected.

--
Regards,
Thomas Johansen (aka. Aylar)


Bobofrut <(E-Mail Removed)> wrote:
> Hi
>
> In my ASP.NET application I try to change dynamicly picture in
> background of page.
> 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 rightMargin=0>
> but it doesn't work.
>
> please help
>
> chris



 
Reply With Quote
 
 
 
 
Bobofrut
Guest
Posts: n/a
 
      02-23-2004
Hi

In my ASP.NET application I try to change dynamicly picture in background of
page.
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
rightMargin=0>
but it doesn't work.

please help

chris


 
Reply With Quote
 
 
 
 
Martin Dechev
Guest
Posts: n/a
 
      02-23-2004
Hi, chris,

Try

<%=getName()%>

instead.

Greetings
Martin
"Bobofrut" <(E-Mail Removed)> wrote in message
news:c1ck39$19r$(E-Mail Removed)...
> Hi
>
> In my ASP.NET application I try to change dynamicly picture in background

of
> page.
> 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
> rightMargin=0>
> but it doesn't work.
>
> please help
>
> chris
>
>



 
Reply With Quote
 
Jon
Guest
Posts: n/a
 
      02-23-2004
Hi,
if you id the body tag then dim it up as a generic control you can change
the background as needed, eg
<body id="theBody" runat="server">
Protected theBody As System.Web.UI.HtmlControls.HtmlGenericControl
theBody.atttributes.add("background", getName())

Jon

"Bobofrut" <(E-Mail Removed)> wrote in message
news:c1ck39$19r$(E-Mail Removed)...
> Hi
>
> In my ASP.NET application I try to change dynamicly picture in background

of
> page.
> 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
> rightMargin=0>
> but it doesn't work.
>
> please help
>
> chris
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DIV background-repeat background-image? For shadow effect jc ASP .Net 3 03-19-2008 04:19 PM
DIV background-repeat background-image for shadowing effect jc HTML 1 03-19-2008 02:16 PM
not able to click on background tab and backgrounds in properties to change the background. rex Computer Support 2 12-06-2006 02:26 AM
How to change Background Image Bobofrut ASP .Net 3 02-27-2004 01:32 PM
changing a background image to a background colour? Dj Frenzy Javascript 3 02-10-2004 08:08 PM



Advertisments