Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 19, 2012 03:34 PM by Mikesdotnetting
Member
9 Points
11 Posts
Mar 19, 2012 03:21 PM|LINK
Is there any reason only the first PageData variable is getting value passed through correctly?
@RenderPage("/_Include.cshtml",new{FirstValue=1},new{SecondValue=2},new{ThirdValue=3}
Then within _Include.cshtml, I am using
<p>@PageData["FirstValue"] : @PageData["SecondValue"] : @PageData["ThirdValue"]</p>
The output I get is
1 : :
Any help would be appreciated. Thanks
webmatrix RenderPage
All-Star
154927 Points
19868 Posts
Moderator
MVP
Mar 19, 2012 03:34 PM|LINK
You seem to be passing in multiple objects whereas just one is needed:
@RenderPage("/_Include.cshtml", new{ FirstValue=1, SecondValue=2, ThirdValue=3 })
cusman-tv
Member
9 Points
11 Posts
RenderPage() and Data
Mar 19, 2012 03:21 PM|LINK
Is there any reason only the first PageData variable is getting value passed through correctly?
@RenderPage("/_Include.cshtml",new{FirstValue=1},new{SecondValue=2},new{ThirdValue=3}Then within _Include.cshtml, I am using
The output I get is
1 : :
Any help would be appreciated. Thanks
webmatrix RenderPage
Mikesdotnett...
All-Star
154927 Points
19868 Posts
Moderator
MVP
Re: RenderPage() and Data
Mar 19, 2012 03:34 PM|LINK
You seem to be passing in multiple objects whereas just one is needed:
@RenderPage("/_Include.cshtml", new{ FirstValue=1, SecondValue=2, ThirdValue=3 })Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter