What is wrong with this Action syntax?

Posted by Community Admin on 05-Aug-2018 21:18

What is wrong with this Action syntax?

All Replies

Posted by Community Admin on 05-Nov-2015 00:00

Trying to call my PageTitle MVC widget, and pass it's Title property in the value in the model.

 

@model SitefinityWebApp.Mvc.Models.SessionsAcademicDetailModel

@Html.Action("Index", "PageTitle", new
    Title = Model.Session.Title
)

<h2>@Model.Session.Title</h2>

 

- Debugging shows I hit this widget first, populate Model.Session

- Shows PageTitle controller gets triggered, but the value of Title is "null"

??

Posted by Community Admin on 25-Nov-2015 00:00

Hello Steve,

To elaborate this issue more information is needed like the codes of the Controller and the models and if there is widget designer then also the codes of the widget designers.  If the Session class is in the different model than the SessionsAcademicDetailModel then was that (Session) initialized with the new constructor? How the Model.Session.Title got its value?

Regards,
Arnob Makhlaqur
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed