Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Blazor Components] How to pass values from a Component page to its hosting layout Component and vice versa #7641

Closed
enetstudio opened this issue Feb 16, 2019 · 5 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@enetstudio
Copy link

Does anyone know how to pass values from a Component page to its hosting layout Component and vice versa ?

Thanks...

@muratg muratg added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 16, 2019
@Andrzej-W
Copy link

@enetstudio
Copy link
Author

Great... Many thanks...

@Andrzej-W
Copy link

Andrzej-W commented Feb 16, 2019

@enetstudio One important note. I'm using Blazor on the client (WebAssembly). Here singleton service is OK. Flight Finder was created as WebAssembly application too. Maybe in the near future it will be ported to Razor Components. In Razor Components you should probably use scoped service. Otherwise you will be sharing state between all users and it is probably not what you want.

@enetstudio
Copy link
Author

I got it. thanks a lot for your help...

@sven5
Copy link

sven5 commented Apr 18, 2019

Any update on this? Still the only way to solve such a scenario?
I think about something like ViewBag or ViewData we're using in MVC.

Thanks
Sven

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

4 participants