1

I want to send/pass some data as parameter from one .cshtml to another .cshtml page.

For example: Html.RenderAction("Action", "Controler", new{name="ABC", age=23});

https://domain/Controller/Action

[.cshtml page]

<label>Name: <label><label>@name<label><br />
<label>Age: <label><label>@age<label><br />
Guru Stron
  • 21,224
  • 3
  • 19
  • 37
Amar Anondo
  • 72
  • 11
  • 2
    Yes, you could, but you probably don't want to. What have you tried? Why do you want this? Why don't you use partials or display templates? – CodeCaster Jul 13 '20 at 09:13
  • 1
    I need to pass custom variable name with custom value as shown in the example. – Amar Anondo Feb 23 '21 at 17:39

0 Answers0