This project is read-only.

partials supported?

Sep 22, 2011 at 4:26 PM

does RazorGenerator support using partials?

Sep 22, 2011 at 6:23 PM

Can you be more specific? 'partial' can mean several things. What are you trying to do?

Sep 22, 2011 at 7:22 PM

I want to be able to have some kind of call to render a partial view from within my view that I am compiling..

We have shared UI that we would like to not have to re code.

Sep 22, 2011 at 7:43 PM

Yes, that should work with RazorGenerator.

Sep 26, 2011 at 3:41 PM
Edited Sep 26, 2011 at 4:23 PM

Can you provide a sample of how to use a partial view in the pre-compiled view 

How does the RazorGenerator resolve the location of the partail view?

Sep 26, 2011 at 7:43 PM

It should work exactly the same way as when not using RazorGenerator. The RazorGenerator.Runtime solution shows this working (look at samples\PrecompiledMvcLibrary\Views\Shared\_LogOnPartial.cshtml).

Sep 26, 2011 at 8:01 PM

I am using the Generator: Template.  So I was looking in the samples\TemplateSample\PrePrcocessedTemplate.cshtml.  I dont see any samples with partials using that Generator.

Sep 26, 2011 at 8:42 PM

Ah, I assumed you meant MVC. For the template case, I think you should be able to just instantiate the partial template class from one template and call its TransformText method.

Sep 27, 2011 at 4:20 PM

Thanks Dave.  Really appreciate the quick responses.  I got it to work.