problem with image tag
-
Hello Friend! I've created a page that create runtime control as follows HtmlAnchor ha = new HtmlAnchor(); ha.InnerHtml = "
"; but instead of displaying image, it shows alter text. when i create the img tag at design time it shows the image.i.e., path is ok. Please help me to show the image. Thanks
-
Hello Friend! I've created a page that create runtime control as follows HtmlAnchor ha = new HtmlAnchor(); ha.InnerHtml = "
"; but instead of displaying image, it shows alter text. when i create the img tag at design time it shows the image.i.e., path is ok. Please help me to show the image. Thanks
Try using the Image control:
Image ha= new Image();
ha.ID = "img2";
ha.ImageUrl = @"Membership/img/icon-calendar.gif";
ha.AlternateText = "d";Declan Bright www.declanbright.com
modified on Friday, April 4, 2008 10:05 AM
-
Try using the Image control:
Image ha= new Image();
ha.ID = "img2";
ha.ImageUrl = @"Membership/img/icon-calendar.gif";
ha.AlternateText = "d";Declan Bright www.declanbright.com
modified on Friday, April 4, 2008 10:05 AM
Sorry Friend! It stills show alter text when i am adding that control in table
-
Sorry Friend! It stills show alter text when i am adding that control in table
Try this:
ha.ImageUrl = @"~/Membership/img/icon-calendar.gif";
Have a look at the page source to see what is been written out to the browser and verify that the path is correct.
Declan Bright www.declanbright.com
-
Try this:
ha.ImageUrl = @"~/Membership/img/icon-calendar.gif";
Have a look at the page source to see what is been written out to the browser and verify that the path is correct.
Declan Bright www.declanbright.com
View Source is ok, it shows correct path.