locked
SVG with ASP.NET??? RRS feed

  • Question

  • User1825796286 posted

    Is SVG still usable in ASP.NET?
    I''ve looked at tutorials at 15 Seconds, MSDN, 4GuysFromRolla and none of them seem to work.

    I have installed the SVG viewer but all the demo's on the sites that acompany the tutorials do not show the SVG. Under IE and try to download the aspx under Fire fox.

    SVG is viewable just fine on my machine... but the tricks used to get it to function dynamicly with asp.net seem to fail.
    From what the totorials are saying I understand thier concept... get an aspx file to output SVG dynamicly then call the aspx file that is mimicing the SVG from another file as if it was an .svg

    I cant get the demo code from any of these sites to work in any browser on my 2 work PC's or my home PC... even the live demo's (that use ASP.NET ) on thier sites don't work in my browsers...

    The examples and tutorials I have seen  seem to be a few years old so I was wondering if it's down to modern browsers not supporting this behavoir(or hackey way of using it with ASP.NET) or is it the 2.0 framework... or is it just me and my browsers?

    Wednesday, March 7, 2007 4:23 AM

Answers

  • User1825796286 posted

    finaly got it sorted :)

    calling the file with scr="svgpage.aspx?.svg" rather than scr=""svgpage.aspx" works

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 9, 2007 8:08 AM

All replies

  • User-768391503 posted

    SVG should work with IE.

    I think you might want to look into this: http://code.google.com/p/explorercanvas/

    Eric

    Wednesday, March 7, 2007 7:48 AM
  • User1825796286 posted

    SVG works fine on my systems and all my browsers... what doesn't work are any demo's that use ASP.NET to call SVG.

    the way it seems to be done under ASP.NET is to have an aspx file output SVG formatted text then have another page call that aspx page like it was an SVG file... no demo I have found using ASP.NET and SVG in this manner works. 

    Wednesday, March 7, 2007 9:24 AM
  • User1825796286 posted

    finaly got it sorted :)

    calling the file with scr="svgpage.aspx?.svg" rather than scr=""svgpage.aspx" works

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 9, 2007 8:08 AM
  • User1196219602 posted
    hi,

    I'm trying to get my asp.net page to serve some content as well. I have a default.aspx page where the user can click on a button to generate svg. Right now the button click code is:
    Server.Transfer("display_svg.aspx");

    Are you saying I need to change it to this?
    Server.Transfer("display_svg.aspx?.svg");

    I tried that already and it still won't display the svg correctly in IE 6 or 7 ( I have Adobe SVG viewer 3 installed). In Opera 9, the svg is displayed correctly using either Server.Transfer versions listed above.

    All my display_svg.aspx is have code that writes the xml for the svg. I have also set the Response.ContentType to "image/svg+xml"


    Friday, March 30, 2007 3:50 PM
  • User-957818921 posted

    u need to replace the Server.Transfer with the code below. this goes in the HTML.

    <embed src="display_svg.aspx?.svg" width="100%" height="100%" type="image/svg+xml">

    Friday, May 18, 2007 4:38 AM