Posts

Showing posts with the label Blazor

Ah Blazor - Now refresh the page!

Started my first Blazor project today.  New to NetCore as well so it was a fun challenge.  I like that is is similar to MVC  and I appreciate  the ability to add code into my page while building without moving to a controller - it was a real challenge to accommodate some JQuery but I got everything to work.  After looking a little closer I realized a large chunk of my JQuery and even javascript could be moved to the @code section and written differently - made for a cleaner, more readable page. I spent over an hour trying to figure out how to do a simple page refresh!  Part of the challenge is that Blazor is a moving target - different libraries and ways of doing simple tasks from version to version - I am confident that most of that will stop as they more clearly define what it is they want to do with this tool. Refresh a page (NetCore 3.1) First set up an alias for the uriHelper - you will now find it in NavigationManager @inject NavigationManager ...