Is there a way to insert inline SVG code directly into an aspx-page?

I tried to set the ContentType to "image/svg+xml" and "application/xhtml+xml" which makes the SVG code running but some aspx-parts do not function properly.