Question

I'm intergrating openId in already developed code (mvc3/razor) I changed the default route to Account/LogOn from Home/Index When I viewed "View page source" from browser(right click), _Layout.cshtml is not rendering. I can see only LogOn.cshtml in view page source. I'm getting few errors, I doubt this can be one of the reasons.

enter image description here

The diagram is output of "view page source"(by right clicking the browser page during runtime) I need the the page to look like green box. Red box is output of my program.

Please help.

Was it helpful?

Solution

You either:

Returning LogOn.cshtm as partial from your action method (i.e., return Partial();)

or

Not specifying layout view for your LogOn.cshtm. If this is the case, specify a layout view in the _ViewStart.cshtml so that it applies to all pages by default OR specify it in the LogOn.cshtm itself using @ { Layout = "~/_Your-Layout-View.cshtml" } directive.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top