Shrimant Telgave
Is it possible to provide a ref and out keyword to the action method in ASP.NET MVC? If yes how it is and if not what is the reason?

Example:

  1. public class HomeController : Controller
  2. {
  3. public string Index(ref int id)
  4. {
  5. return "This is Index Method" + id;
  6. }
  7. }
By Shrimant Telgave in .NET on Oct 04 2019
  • Prakash Patel
    Nov, 2019 26

    1. ref and out variable store address of the value.

    2. So it not possible to pass address of variable using url or other way.

    • 2
  • Kanaga Raj
    Oct, 2019 15

    Its not possible, because of the "action method" called by ajax method how we pass the ref parameter from ajax input.

    • 1
  • Girma Halie
    Feb, 2020 1

    Yes

    • 0
  • Srikanth Kumar  Rajulapati
    Dec, 2019 19

    NA

    • 0
  • Srikanth Kumar  Rajulapati
    Dec, 2019 19

    NA

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS