Redefining the model

1 view
Skip to first unread message

Roy Jacobs

unread,
May 20, 2010, 4:05:46 AM5/20/10
to Spark View Engine Dev
Hi,

this topic has come up a few times in the archives, but I never saw an
actual answer:

Let's say I have a strongly-typed view. I like this, because stuff
like MvcContrib Html Helpers use the model so that I can do stuff
like: this.Input(x => x.Name); and so on.

In this view, I am using a number of partials. The partial is also
strongly typed, so that I can continue using the HtmlHelpers etc.

However, Spark doesn't allow me to redefine the model in a partial,
and therefore I need to render this partial through the controller
somehow. Currently I am using an ajax request for this, but that is
clearly not ideal.

So my question is:
Is there some way to render a strongly-typed partial from a strongly-
typed view?

And, if I still need to go through the controller somehow:
Can I call a controller action from Spark without needing an ajax
request?

Thanks,
Roy

--
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+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.

Adam Schroder

unread,
May 20, 2010, 4:14:46 AM5/20/10
to spar...@googlegroups.com
It will if u call #RenderPartial()

Roy Jacobs

unread,
May 20, 2010, 4:27:42 AM5/20/10
to Spark View Engine Dev
Ah, naturally! I don't know why I was ignoring the regularly available
rendering methods.

On May 20, 10:14 am, Adam Schroder <adamschro...@gmail.com> wrote:
> It will if u call #RenderPartial()

Reply all
Reply to author
Forward
0 new messages