Blazor Tutorial C# - Part 2 | Razor Components | dotnet 5 - dotnet 6

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 90

  • @CodingDroplets
    @CodingDroplets  Рік тому

    ⭐ Join Us on Patreon: www.patreon.com/CodingDroplets
    💥Host Your Blazor App in Linux: ua-cam.com/video/bXK-F-uL7Qo/v-deo.html
    🔗Blazor Tutorial Series Playlist link:
    ua-cam.com/play/PLzewa6pjbr3IQEUfNiK2SROQC1NuKl6PV.html

  • @randindondan
    @randindondan 9 місяців тому +2

    This is a great way you have of explaining, showing all the passages makes it easier to understand! Well done.

    • @CodingDroplets
      @CodingDroplets  9 місяців тому

      Thank you very much! Glad to hear that.

  • @tomarik
    @tomarik 2 роки тому +2

    Moving the C# code into a partial class was 🤯🤯🤯!
    Great videos.

    • @CodingDroplets
      @CodingDroplets  2 роки тому +1

      Most welcome! Glad to know you liked it.
      Hope you are clear with partial classes.

  • @piriyaie
    @piriyaie 2 місяці тому +1

    Thank you for this video. It has helped me a lot. It is important to mention that you can also extract the entire C# code by right-clicking on @code in Visual Studio and then on “Quick actions and Refactoring...” and then selecting: “Extract block to code behind”. This is much easier than how you show it in the video. Apart from that, I liked the video very much. Thanks again.

    • @CodingDroplets
      @CodingDroplets  2 місяці тому

      Thank you for your kind words and for sharing that helpful tip! Appreciate your feedback and glad to hear that you liked the video!

  • @munyunu
    @munyunu Рік тому +1

    Masterwork. Thank you for going slow and taking time to actually explain.

    • @CodingDroplets
      @CodingDroplets  Рік тому +1

      Thank you for your kind words! I'm glad to hear that you the video helpful and that the pace and explanations were effective for your learning.
      I strive to make my videos accessible and understandable for all levels of learners, and it's rewarding to hear that my efforts are appreciated.

  • @markdavies1468
    @markdavies1468 11 місяців тому +1

    I have watched a few training videos around Blazor but this is by far one of the best ones I have seen. A lot of the information I was looking for has been covered in this one hour video and the way this has been presented is very clear and makes it easy to learn and follow. Love your work.

    • @CodingDroplets
      @CodingDroplets  11 місяців тому

      Thank you so much for your kind words! Glad to hear that.

  • @OnoderaMyGirl
    @OnoderaMyGirl Рік тому +1

    thankss againnn
    You're really great teacher in youtube
    unlike other youtuber their tutorial can't understand by beginner. Thanks for making videos that can easy to understand

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you so much for your kind words and appreciation! We're glad to hear that you found the tutorial helpful and easy to understand.

  • @hexoter
    @hexoter 2 роки тому +3

    I love the way u explain , u got my subscription

    • @CodingDroplets
      @CodingDroplets  2 роки тому +1

      Thank You so much. Glad to know you liked it.

  • @grzegorzborowski4284
    @grzegorzborowski4284 Рік тому +2

    Beautiful! All stuff is great. Keep doing your work and thank you for sharing knowledge.

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you so much for watching and leaving such a kind comment! I really appreciate your support and encouragement.

  • @anilkumarmootha3738
    @anilkumarmootha3738 5 місяців тому +1

    Excellent video and topics covered are really good.

  • @eraldoka349
    @eraldoka349 Рік тому +1

    Reallyy man ,,,you are amazing teacher..im teaching a lot from you..thank you Big Friendd

    • @CodingDroplets
      @CodingDroplets  Рік тому

      I appreciate your kind words! Glad to hear that you find the tutorials helpful. Thank You.

  • @miguelsegura1859
    @miguelsegura1859 3 місяці тому +1

    Thanks, this content is really good and easy to understand.

  • @JoseOrtega-oc9ip
    @JoseOrtega-oc9ip Рік тому +1

    Awesome tutorial!
    Subscribed!
    Thank you for posting!

  • @harran9962
    @harran9962 Рік тому +1

    Very good, I learned lots.

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you for watching the tutorial and for your positive feedback! I'm glad to hear that you found the content helpful and that you learned a lot from it. It's always rewarding to know that the tutorial has been beneficial to viewers.

  • @akarmuhialdeen3408
    @akarmuhialdeen3408 Рік тому +1

    you are the best

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Wow, thank you so much for your kind words! I'm glad to hear that.

  • @ezhilraj9983
    @ezhilraj9983 8 місяців тому +1

    Best video ever 🎉

  • @bertrandspitz7413
    @bertrandspitz7413 2 роки тому +1

    Thank you very munch for these great tutos
    I just have the following question.
    At the 51 minutes mark, when you go with async you have an exeption thrown at line 3.
    In my case I have just the info "An unhandled error has orrcured" in the browser window and I have to open the browser's debug tools to see where the error is comming from.
    How did you manage to see the exeption in Visula Studio?
    Thank you

    • @CodingDroplets
      @CodingDroplets  2 роки тому

      It will show the error message if you are debugging in visual studio. Just confirm that you have selected the "Debug" option in Solution Configurations.

    • @bertrandspitz7413
      @bertrandspitz7413 2 роки тому

      @@CodingDroplets Thank you for your feedback.
      I run the application in debug mode but it doesn't break when the exception occurs.

  • @dongyang1285
    @dongyang1285 Рік тому +1

    Thanks you very much, Teacher

  • @BarthObiefuna
    @BarthObiefuna 2 роки тому +3

    Good teacher

  • @conggaro
    @conggaro 5 місяців тому +1

    I am using visual studio 2022, but it does not suggest C# code when writing in .razor file, please help me

    • @CodingDroplets
      @CodingDroplets  5 місяців тому

      Make sure you have the latest updates for Visual Studio and any relevant extensions installed. Sometimes, simply restarting Visual Studio can help refresh the IntelliSense cache

    • @jalalmalekpour402
      @jalalmalekpour402 5 місяців тому

      Separate C# code from cshtml code

  • @regism4770
    @regism4770 2 роки тому +1

    What happens if you delete a contact while the variable 'displayInfo' of the preceding line is true?

    • @CodingDroplets
      @CodingDroplets  2 роки тому

      If you delete a contact, it will get removed from the list even if the displayInfo value is true. The entire razor component will get removed including the info section.

  • @luisfernandodeolazabalsche3317
    @luisfernandodeolazabalsche3317 2 роки тому +1

    Muchas gracias.

  • @ansvar7882
    @ansvar7882 Рік тому +1

    Thnks very useful!

  • @ahmedeleddrisy8438
    @ahmedeleddrisy8438 2 роки тому +1

    thank you very much

  • @DesertScorpionKSA
    @DesertScorpionKSA Рік тому

    I'm assuming the @bind="DisplayEmail" is binding the checked attribute to the DisplayEmail variable. What is you want to bind to a different attribute to some other HTML tag?

  • @ZenOfKursat
    @ZenOfKursat 7 місяців тому +1

    what if List initial values not defined in Oninitialized method. is it necessary ?. lemme check...

    • @CodingDroplets
      @CodingDroplets  7 місяців тому

      Thank you for your comment! Initially, I defined the list's initial values in the OnInitialized method. However, for demonstration purposes of delayed loading, I later moved it to the OnInitializedAsync method.

  • @YoungGuala
    @YoungGuala 2 роки тому +2

    Awesome content! Keep the videos coming!

    • @CodingDroplets
      @CodingDroplets  2 роки тому +1

      *Thank You so much.* Glad to know you liked it.

  • @fanzfanzilla
    @fanzfanzilla 6 місяців тому +1

    Thank you for the video. Can you do me a favor by making the visual studio font size a little larger? It will make it easier for me to follow you.

    • @CodingDroplets
      @CodingDroplets  6 місяців тому

      Of course! Thank you for the feedback. I'll make sure to increase the font size in the next video to make it easier for everyone to follow along. Appreciate your suggestion!

  • @shailydesai7097
    @shailydesai7097 Рік тому +1

    Do you have any videos on using managing sessions and Cache with Blazor server in .NET Core?

    • @CodingDroplets
      @CodingDroplets  Рік тому +1

      Thank you for your question! While I don't have a video specifically on managing sessions and cache with Blazor Server in .NET Core at the moment, I'm planning to create one soon. It's a valuable topic, and I appreciate your interest.

    • @shailydesai7097
      @shailydesai7097 Рік тому +1

      @@CodingDroplets Sounds great! Will looking forward for it.

  • @expertreviews1112
    @expertreviews1112 Рік тому +1

    awesome content! quick question, why is data binding so different in Blazor and Xamarin, here @bind is enough whereas in Xamarin you have Binding expressions which are little verbose

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you for your positive feedback on the tutorial! I'm glad you found the content awesome. Regarding your question about data binding differences between Blazor and Xamarin, you're right that the syntax and approach can differ between the two frameworks.
      Blazor uses a declarative syntax where you can use the @bind directive to create two-way data binding between a property in the component and a UI element. This simplifies the data binding process and makes it more concise.
      On the other hand, Xamarin follows a more explicit approach with binding expressions. In Xamarin, you typically use binding expressions to define the source and target of the data binding, including properties, converters, and events. This can sometimes result in more verbose binding expressions compared to the @bind directive in Blazor.
      Both approaches have their own advantages and are tailored to the specific needs and architecture of each framework. It's important to familiarize yourself with the data binding mechanisms specific to each framework you are working with.

  • @aarefsh6760
    @aarefsh6760 2 роки тому +1

    thank you very much
    but I preferred to run the project without debugging so you don't have to run and stop much time since there is no need to debug values or stuff and of course, the hot reload is enabled

    • @CodingDroplets
      @CodingDroplets  2 роки тому +1

      Thank you for your valuable feedback. Will consider it from next video onwards.

    • @LawlFrank
      @LawlFrank 2 роки тому

      Maybe it wasn't possible before, but now you can hot reload during debugging.

  • @SIR_Studios786
    @SIR_Studios786 2 роки тому +1

    at 20:49 my code is giving exception of edit form ,,, i am using dotnet 6 vs 2022

    • @CodingDroplets
      @CodingDroplets  2 роки тому

      Are you getting the error while using Arbitrary Parameters?

    • @SIR_Studios786
      @SIR_Studios786 2 роки тому +1

      ​@@CodingDroplets yes, InvalidOperationException: Microsoft.AspNetCore.Components.Forms.InputText requires a cascading parameter of type EditContext.

    • @SIR_Studios786
      @SIR_Studios786 2 роки тому +1

      Sorry its working now actually i used instead of

    • @CodingDroplets
      @CodingDroplets  2 роки тому +1

      OK .. Thank You for reaching us. If you require any further information, feel free to contact us.

  • @joaopedrosoaresrodriguespa6579

    forti!

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you for watching the video and leaving a comment!

  • @jenni4809
    @jenni4809 2 роки тому +1

    why override OnInitialized()? and what does base.OnIntialized() do?

    • @CodingDroplets
      @CodingDroplets  2 роки тому +3

      OnInitialized will get invoked when the razor component is initialized. So if we need to do something while loading the component, we can implement it in OnInitialized method.
      Override is a keyword used to replace a virtual member that is defined in a base class with the definition of that member in the derived class.
      base.OnIntialized() will execute the base class method.
      Please refer Razor Component Lifecycle documentation:
      docs.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle

    • @jenni4809
      @jenni4809 2 роки тому +1

      @@CodingDroplets thank you i appreciate the reply!

    • @CodingDroplets
      @CodingDroplets  2 роки тому

      Most welcome!

  • @yyttommy2456
    @yyttommy2456 Рік тому +1

    Very thanks, but I can not find the source code

    • @CodingDroplets
      @CodingDroplets  Рік тому

      I'm glad you found the explanation of Razor Components helpful! However, I must apologize, as the source code is not available for this particular video. The content focused more on explaining the concepts and usage of Razor Components.

  • @erikmartin2
    @erikmartin2 5 місяців тому +1

    Why is it CurrentContact="contact" and not CurrentContact=@contact?

    • @CodingDroplets
      @CodingDroplets  5 місяців тому +2

      Blazor can accept both formats. If the parameter is a string datatype, you need to provide the @ symbol. For example:
      CurrentContact="contact" is used when contact is a literal string value.
      CurrentContact=@contact is used when contact is a variable holding a string or an object.
      Make sure to use the @ symbol when binding a variable or expression to the component parameter.
      Hope this helps!

  • @DecentProgrammer
    @DecentProgrammer Рік тому +1

    Your videos are really helpful and I appreciate your efforts.
    But sometimes you are not sure what you want to do and you jump from one file to another and you write and undo some stuff and it creates confusion for viewers, so it would be better if you don't do that.
    I hope you take it in a positive way.
    It will help you grow as a channel.
    Thanks for the video though, really helpful.

    • @CodingDroplets
      @CodingDroplets  Рік тому +1

      Thank you for your feedback and the kind words about the helpfulness of the videos. I genuinely appreciate your input and take it in a constructive spirit.
      I understand that clarity and consistency in video content are important for viewers. Your feedback about avoiding unnecessary jumps between files and ensuring a smoother flow is valuable. It's feedback like this that helps improve the quality of content.
      I'll certainly take your suggestion into consideration to enhance the viewing experience in future videos. Your support and input are greatly appreciated, and I'm glad you found the video helpful. If you have any specific topics or ideas you'd like to see in upcoming videos, feel free to share them. Thanks again! 😊

  • @vittoriomorellini1939
    @vittoriomorellini1939 Рік тому +1

    It is the same as css modules

    • @CodingDroplets
      @CodingDroplets  Рік тому

      Thank you for your comment! While there may be some similarities between Blazor Razor Components and CSS modules, they serve different purposes and have distinct features.

  • @couches
    @couches Рік тому +4

    Peter Bob

  • @solomonfried7018
    @solomonfried7018 2 роки тому +1

    Great tutorial.
    Just one question. In the code you have If (Contacts == null () else if (Contacts.Count == 0) .. else {} ....
    I don't understand how the entire if statement is re-executed when the Contacts list get loaded. When does ContactsList.razor get retried?
    Thank you

    • @CodingDroplets
      @CodingDroplets  2 роки тому

      That is how Blazor works. Blazor will render the UI when the value changes. Below URL gives you better idea of the Razor component lifecycle.
      docs.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-6.0

  • @minxtech3069
    @minxtech3069 2 роки тому +2

    Awesome content! Keep the videos coming!