0

I need to do some processing in a razor layout page. The easy way to get a value from the query string is to do a Request.Query["Name"] and get the value. previously, I had called Urldata[0] and gotten the first value. I figured out how to overcome in this in a razor page, but I'm not having any luck trying the same thing in a layout page. Any pointers that anyone can share?

More Info - I have a scoreboard page setup. I can accept a tournamentid value one of two ways: scoreboard?TournamentId=12345 or scoreboard/12345

I need an easy way to get the tournamentid value in a layout page that accepts either format. Any ideas?

Wally

Wallace B. McClure
  • 1,165
  • 1
  • 15
  • 31

1 Answers1

0

Use ViewBag to pass data to the layout view.

This answer might help https://stackoverflow.com/a/52616232/7592836

Sohaib Afzal
  • 105
  • 1
  • 9