curiouswebster
asked on
Using partial views in Razor
How do I load a partial view from a cshtml file?
I thought I could use:
@Html.RenderPartial("razor Filename")
But it doees not yet work. Is this correct and pointing to an error in the format of my partial View? What are the rules of a partial page's format?
I thought I could use:
@Html.RenderPartial("razor
But it doees not yet work. Is this correct and pointing to an error in the format of my partial View? What are the rules of a partial page's format?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I thought a partial view did not have a body tag? Maybe I was wrong.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I the _Layout.cshtml has a <Body> and a <Head> section, does that mean the partial page can not have one also? Or would the partial's take precedence?
ASKER
"If the" is what I meant
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thakns!
ASKER
Well, there are certain sections a normal page must have that a partial can not have. I was hoping for a list.