SVG with ASP.NET???

Last post 05-18-2007 4:38 AM by faisal_v. 5 replies.

Sort Posts:

  • SVG with ASP.NET???

    03-07-2007, 4:23 AM
    • Member
      52 point Member
    • UnderTheGun
    • Member since 02-07-2007, 7:30 PM
    • Posts 44

    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?

  • Re: SVG with ASP.NET???

    03-07-2007, 7:48 AM
    • All-Star
      20,690 point All-Star
    • A1ien51
    • Member since 05-06-2005, 6:46 PM
    • MD USA
    • Posts 3,806

    SVG should work with IE.

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

    Eric

  • Re: SVG with ASP.NET???

    03-07-2007, 9:24 AM
    • Member
      52 point Member
    • UnderTheGun
    • Member since 02-07-2007, 7:30 PM
    • Posts 44

    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. 

  • Re: SVG with ASP.NET???

    03-09-2007, 8:08 AM
    Answer
    • Member
      52 point Member
    • UnderTheGun
    • Member since 02-07-2007, 7:30 PM
    • Posts 44

    finaly got it sorted :)

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

  • Re: SVG with ASP.NET???

    03-30-2007, 3:50 PM
    • Member
      2 point Member
    • hwong101
    • Member since 03-30-2007, 7:31 PM
    • Posts 1
    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"


  • Re: SVG with ASP.NET???

    05-18-2007, 4:38 AM
    • Member
      2 point Member
    • faisal_v
    • Member since 11-22-2005, 2:34 AM
    • Posts 1

    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">

Page 1 of 1 (6 items)