Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > HtmlImage Src lost

Reply
Thread Tools

HtmlImage Src lost

 
 
Chris
Guest
Posts: n/a
 
      02-07-2005
I'm creating a enlarged image that needs to be on a layer over a copy
of the same image to keep it space in the HTML below. I therefore want
2 copies of the same IMG tag.

When I render the HtmlImage control twice the src attriute doesn't
appear for the second IMG tag. I've made the IDs different and even
tried coping the SRC attribute again. Why is this? Do I have to create
the HtmlImage all over again?

HtmlImage image ;
image = createImage() ;

Response.Write("<div style='position: relative'>");
image.RenderControl( new HtmlTextWriter(Response.Output) ) ;
Response.Write("<div style='position: absolute; z-index: 1'>");
image.Attributes.Add("onclick", "this.style.width='250px'") ;
image.Attributes.Add("onmouseout", "this.style.width='80px'") ;
image.ID = "pop" + image.ID ;
image.RenderControl( new HtmlTextWriter(Response.Output) ) ;
Response.Write("</div>");
Response.Write("</div>");
 
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
HtmlImage and asp:Image servent onclick event RKT ASP .Net 3 12-24-2005 10:06 PM
HtmlImage.Src not binding dynamically alto ASP .Net Web Controls 0 08-30-2005 03:57 PM
HtmlImage Problem J ASP .Net 0 03-27-2005 12:08 AM
System.Web.UI.HtmlControls.HtmlImage Dave.NET ASP .Net Web Controls 0 06-08-2004 08:36 PM
img src in HtmlImage is not always diplayed Alberto ASP .Net 0 05-26-2004 02:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57