{"action":"closed","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/4294","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/4294/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/4294/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/4294/events","html_url":"https://github.com/aspnet/Mvc/issues/4294","id":140927213,"number":4294,"title":"PartialViewResult in Controller with ViewData","user":{"login":"markusvt","id":2082863,"avatar_url":"https://avatars.githubusercontent.com/u/2082863?v=3","gravatar_id":"","url":"https://api.github.com/users/markusvt","html_url":"https://github.com/markusvt","followers_url":"https://api.github.com/users/markusvt/followers","following_url":"https://api.github.com/users/markusvt/following{/other_user}","gists_url":"https://api.github.com/users/markusvt/gists{/gist_id}","starred_url":"https://api.github.com/users/markusvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusvt/subscriptions","organizations_url":"https://api.github.com/users/markusvt/orgs","repos_url":"https://api.github.com/users/markusvt/repos","events_url":"https://api.github.com/users/markusvt/events{/privacy}","received_events_url":"https://api.github.com/users/markusvt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-15T10:04:35Z","updated_at":"2016-03-15T14:13:56Z","closed_at":"2016-03-15T14:13:56Z","body":"Hi. I have the following scenario: In a View I do an ajax request to a controller, which renders a PartialView based on a posted id.\r\n\r\nIn the controller I can write ```return PartialView(\"MyView\", model);```\r\n\r\nNow I just have the problem, that in the PartialView, there is a form which is supposed to have a specific prefix. In a View I can use the following:\r\n```\r\n@{\r\n   var myViewData = new Microsoft.AspNet.Mvc.ViewFeatures.ViewDataDictionary(ViewData);\r\n   companyViewData.TemplateInfo.HtmlFieldPrefix = \"MyPrefix\";\r\n}\r\n@Html.Partial(\"/PathTo/_Partial\", Model, myViewData ) \r\n```\r\n\r\nI think it would be nice, if one could do the same (put a ViewData in the PartialView) in the Controller with that PartialView Result.\r\n"}}