-
Notifications
You must be signed in to change notification settings - Fork 920
Closed
Description
Asp.net MVC ReactJs.net : loading Index.cshtml as a Partial View:
HTML loads fine but when I look at chrome developer's tool React tab, nothing loads. looks like react has not initialized properly and that's why react component controls do not show onClick/onChange behavior.
We have MVC website and we want only Data-entry/form submission part to be handled using React.
When I load Index.cshtml as View everything works.
Steps I have already tried:
- Using Server Side rendering (Adding jsx file to ReactConfig.cs)
- Using Asp.net minification and bundling using babblebundle in BundleConfig.cs.
I assumed may be issue is that it is not precompiled and serving it using Ajax's $(#div).html('<Index.cshtml>') not able to understand jsx.
I am using server side rendering for initial load
@Scripts.Render("~/bundles/main")
@Html.React("MyForm", new
{
initialData = Model.Form,
validationUrl = Url.Action("GetValidation"),
submitUrl = Url.Action("SaveForm")
})
Layout.cshtml contains navigation panel/header/footer which are using mix of Jquery/Kendui controls
Metadata
Metadata
Assignees
Labels
No labels