jeudi 12 mai 2016

how can I use Html.RenderPartial to get value

I have this view

@model WebSite.Models.mymodelModel
@{     ViewBag.Title = "AudioPlayer2"; }
<div>    
    @{Html.RenderAction("AudioPlayer", "mycontroller", new { storyId = 3027, className = "" });}
</div>

the @model comes null all the time SO,how can I use Html.RenderPartial to get the @model.storyId which I can get from controller as

 List<str> rtn = new List<str>();
   rtn = GetLatestEpisodes(DateTime.Now.AddMonths(-3).ToString(), DateTime.Now.ToString(), 0, 1);

storyId is the rtn.stroryId

Aucun commentaire:

Enregistrer un commentaire