Additions

6 views
Skip to first unread message

chrisbond

unread,
Jan 23, 2007, 8:17:52 AM1/23/07
to Open Shopping Cart
Can someone please commit the following to the codebase it makes
AddToCartHyperlink control support Images if specified otherwise just
uses normal one.

Change Web.UI.WebControls/AddToCartHyperLink.cs from:

writer.Write(Text); to:

protected override void RenderContents(HtmlTextWriter writer)
{
if (this.ImageUrl.Length > 0)
{
Image img = new Image();
img.ImageUrl = ResolveUrl(this.ImageUrl);
img.AlternateText = this.Text;
img.BorderWidth = new Unit(0, UnitType.Pixel);
img.RenderControl(writer);
}
else
{
writer.Write(Text);
}
}

Marc Chouteau

unread,
Jan 23, 2007, 12:20:41 PM1/23/07
to open-shop...@googlegroups.com
Hi Chris Bond,
 
Thanks for your contribution , thi code is commited on codeplex now
 
Marc

 
On 1/23/07, chrisbond <ch...@logics.co.uk> wrote:

Can someone please commit the following to the codebase it makes
AddToCartHyperlink control support Images if specified otherwise just
uses normal one.

Change Web.UI.WebControls/AddToCartHyperLink.cs from:

writer.Write(Text); to:

               protected override void RenderContents(HtmlTextWriter writer)
               {
           if ( this.ImageUrl.Length > 0)

Chris Bond

unread,
Jan 24, 2007, 3:32:06 AM1/24/07
to open-shop...@googlegroups.com
Brilliant thanks! Any news on design-time reports.....
Reply all
Reply to author
Forward
0 new messages