In my main page (call it index.aspx) I call
<%Html.RenderPartial('_PowerSearch', ViewData.Model);%>
Here the viewdata.model != null When I arrive at my partial:
<%=ViewData.Model%>
Says viewdata.model == null
What gives?!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried just passing in ViewData instead of ViewData.Model? This is an abridged version what I use in my helpers (shamelessly stolen from the Storefront series):
Note that I pass in the current ViewData and not the Model.