Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

SVG won't render in aspx page

11:27 am on Feb 11, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 28, 2009
posts: 57
votes: 0


I'm working on a website that uses a gradient background. Because we are allowing the site to be styled where the client can use a wizard to specify colours and the colour hexcode is added to the code we are using SVG instead of static images.

I tested the svg code on my machine with a html page and it renders fine (in IE using the filter section and in Firefox, safari, chrome and opera using the SVG).

We are building the project in VS2010 and once i added the code to the default.aspx it won't render the SVG however the filter for IE still works. Can some one help please?

Do i need a plugin or need to install something to VS to get the SVG to render on the .aspx page?

default.aspx and hdr.svg are in the same folder in the project:-

<div style="position:absolute;top:0;left:0">
<!--[if !IE]>-->
<object data="hdr.svg" type="image/svg+xml" width="144" height="34">
<div style="width:144px;height:34px;background-color:#449144;"></div> </object>
<!--[if IE]>
<div style="width:144px;height:34px;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#003399',EndColorStr='#6699ff');"></div>

thanks in advance
1:20 pm on Feb 12, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 28, 2009
votes: 0

I found a blog that states that it's a problem with VS2010:

If anyone knows anything about SVG in VS2010 i'd be grateful of the help