Live Chat Icon For mobile
Live Chat Icon

How do you bind data in Blazor?

Platform: Blazor| Category: Data binding

You can bind the data with DOM element using the “@” prefix with a C# parameter. Refer to the following example for one-way data binding.

@page "/"
  
 <h2>Hello, @Name!</h2>
  
 @code {
    
     private string Name { get; set; } = "Blazor";
 }  

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.