rendering ascx partial views

5 views
Skip to first unread message

JoshClose

unread,
Nov 16, 2009, 3:09:48 PM11/16/09
to Spark View Engine Dev
I'm trying to find a way to use the asp.net charting controls in mvc
with spark. I've been able to do it by using straight code, but I'd
like to be able to use markup instead.

A way I thought that I could accomplish this is by creating an ascx
partial view, and just rendering that instead. I can get them to
render just fine by themselves, but I need a spark view to be able to
render it.

So far, the only way I can do this is:

#Html.RenderPartial( "MyAscxView" );

This will render the image as the first thing on the page though, and
not where I had it placed in the html, which makes sense considering
what it's doing.

Is there any way to have a spark view render an ascx view inline?

Thanks.

Morten Maxild

unread,
Nov 18, 2009, 6:41:43 AM11/18/09
to spar...@googlegroups.com
Look in the PartialFiles sample project. There you will find ViewPage and ViewUserControl subclasses that monkeys with the output textwritter/stream

Remember to read the xml doc about registration in config.

See if this helps when mixing spark and web forms engines

/Morten
>--~--~---------~--~----~------------~-------~--~----~
>You received this message because you are subscribed to the Google Groups
>"Spark View Engine Dev" group.
>To post to this group, send email to spar...@googlegroups.com
>To unsubscribe from this group, send email to spark-
>dev+uns...@googlegroups.com
>For more options, visit this group at http://groups.google.com/group/spark-
>dev?hl=en
>-~----------~----~----~----~------~----~------~--~---

Reply all
Reply to author
Forward
0 new messages