Abe
Abe

Reputation: 6516

Service Stack 4.0.15: Razor Partial not outputted inside @section

Summary: Razor Partials don't get rendered inside a @section in ServiceStack 4. This seems to be a bug in ServiceStack.Razor.

Version: ServiceStack 4.0.15

Affected Package: ServiceStack.Razor

Razor partials inside a section does not get rendered.

Example

Inside _Layout.cshtml

@RenderSection("JavascriptConfig", required: false)

Inside home.cshtml

@section JavascriptConfig {
    @Html.Partial("_routes", Model.Lang)
}

Inside _routes.cshtml

@model string
test

If I look at the source code of the rendered View, there is no HTML outputted.

Upvotes: 1

Views: 244

Answers (1)

Abe
Abe

Reputation: 6516

I reported the issue on Github and a fix was posted in less than 19 hours! So, this issue is no longer an issue as of ServiceStack 4.0.16 (pre-release)

https://github.com/ServiceStack/Issues/issues/60

Upvotes: 1

Related Questions