Can you try using
Thanks for your input. In page controller I can't write @await Component.InvokeAsync("_Login") but I tried to write
and I got the error that viiew component _Login couldn't be found and it makes sense as _Login is not a view component but just partial view
We are in process of migrating from EPiServer to Optimizely 12 (.NET 6)., and have encountered this issue of partial view.
Basically we have a component (login block) and in the razor view of the loginblock we are calling another partial view ->
Which shows the form modal with two input fields (username & password) for login. The post request (Ajax form) is sent to our start page which contains a post action method
If modelstate is not valid it should return the partial view, what it does is just return the partialview markup and nothing else. like this
In EPiServer 11 it was returning whole page layout with bootstrap etc., and the partial view was embedded into it.
Any help would be appreciated