search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Sending parameters to HTML.Partial in C#
Posted in Windows Server | No Comment | 2,000 views | 12/09/2015 17:19

You can send extra parameters to HTML.Partial with following example:

@{Html.RenderPartial("~/Views/Shared/GlobalScripts.cshtml", new ViewDataDictionary { { "timeRangeSessionValue", timeRangeSessionValue }, { "apiUrl", apiUrl } });}

You can get parameters with following:

@ViewData["apiUrl"]

You can populate parameters.



Leave a Reply