mvc partial view capture value

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
i have  @Html.Partial("~/Views/Shared/_ListingsSubEvent.cshtml", "13") on razor
how to capture the value(13) on _ListingsSubEvent.csthml?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ǩa̹̼͍̓̂ͪͤͭ̓u͈̳̟͕̬ͩ͂̌͌̾̀ͪf̭̤͉̅̋͛͂̓͛̈m̩̘̱̃e͙̳͊̑̂ͦ̌ͯ̚d͋̋ͧ̑ͯ͛̉Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

Commented:
It'll probably be a bit inflexible if you don't use a class, but since you're passing a string, make your model in "_LisintsSubEvent.cshtml" be a string.

e.g.

@model System.String

...

<div>@Model</div>

...

Open in new window

Author

Commented:
@model system.int16

int16 x = @Model.

Will this work?
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015
Commented:
If you remove the quotes where you pass 13, then yes.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial