SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
DATA BINDING
M I C R O S O F T B L A Z O R
INTR ODUC TION
o Data binding is a mechanism in Blazor that allows
you to establish a connection between the
application’s data and the User Interface
o Enables the successful data synchronization
o There are five main types of data binding:
o One-way data-binding
o Two-way data-binding
o Event Binding
o Form Binding
O N E - WAY DATA - BIN DING
o Provides one way communication between UI and code
o Does not allow dynamic changes based on changes in the code.
Whatever you state in your code will be reflected in your UI
o If user makes any update in UI, it does not propagate back to the
code
o There are two methods of one-way data-binding:
o Using @ syntax
o Using Bind Attribute
O N E - WAY DATA - BIN DING
o We use @ symbol to get the value from the code to the UI.
o We generally use this method to bind @code part of the code with
@page part of the markup.
O N E - WAY DATA - BIN DING
o We use @bind-value attributes such as @bind-value and @bind-
values to save or fetch data from other components or resources.
o This can include saving the information into the database, getting
the information from the database, displaying the information
present inside the database.
O N E - WAY DATA - BIN DING
T W O - WAY DATA - BIN DING
o Used to perform bi-directional data flow
o It is commonly used with form elements, such as textboxes,
checkboxes and other element, maintaining a synchronized state
o The two-way data-binding uses @bind directive to perform the
communication, typically applied to the value attribute of an input
element
o Simplifies the process of handling user inputs and keeping the UI
and application process synchronized
T W O - WAY DATA - BIN DING
o Used to perform bi-directional data flow
o It is commonly used with form elements, such as textboxes,
checkboxes and other element, maintaining a synchronized state
o The two-way data-binding uses @bind directive to perform the
communication, typically applied to the value attribute of an input
element
o Simplifies the process of handling user inputs and keeping the UI
and application process synchronized
T W O - WAY DATA - BIN DING
EVEN T BI NDIN G
o Event binding refers to the process of associating C# methods with
multiple HTML events
o This mechanism enables you to handle events such as button
clicks, mouse movements, and keyboard inputs, making the web
application interactive and responsive
o This includes @onclick, @oninput, @onchange, @onmouseover
etc.
FORM BIN DING
o Form binding refers to the process of associating a Blazor
components with the HTML form and handling form submissions
o Uses the Blazor’s in-built feature “EditForm” that simplifies the
implementation of form-related functionality
o This also helps in form-related functionality, including model
binding, validation and event handling

Mais conteúdo relacionado

Semelhante a #5 | Data Binding | Microsoft Blazor | Sameer Siddiqui

"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-FlowZettaScaleTechnology
 
Real Time Head Generation for Video Conferencing
Real Time Head Generation for Video ConferencingReal Time Head Generation for Video Conferencing
Real Time Head Generation for Video ConferencingIRJET Journal
 
Angular crash course
Angular crash courseAngular crash course
Angular crash courseBirhan Nega
 
Angular js- 1.X
Angular js- 1.XAngular js- 1.X
Angular js- 1.XNitin Giri
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppMike Taylor
 
Gouthami Resume(2)
Gouthami Resume(2)Gouthami Resume(2)
Gouthami Resume(2)gouthami02
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014Sarah Hudson
 
IEEE Projects 2013 For ME Cse @ Seabirds ( Trichy, Thanjavur, Perambalur, Di...
IEEE Projects 2013 For ME Cse @  Seabirds ( Trichy, Thanjavur, Perambalur, Di...IEEE Projects 2013 For ME Cse @  Seabirds ( Trichy, Thanjavur, Perambalur, Di...
IEEE Projects 2013 For ME Cse @ Seabirds ( Trichy, Thanjavur, Perambalur, Di...SBGC
 
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud Integration
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud IntegrationWebinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud Integration
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud IntegrationAPPSeCONNECT
 
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEM
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEMBLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEM
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEMIRJET Journal
 
Services and Linked Data: John Domingue (KMi, UK)
Services and Linked Data: John Domingue (KMi, UK)Services and Linked Data: John Domingue (KMi, UK)
Services and Linked Data: John Domingue (KMi, UK)FIA2010
 
Data Exchange Design with SDMX Format for Interoperability Statistical Data
Data Exchange Design with SDMX Format for Interoperability Statistical DataData Exchange Design with SDMX Format for Interoperability Statistical Data
Data Exchange Design with SDMX Format for Interoperability Statistical DataNooria Sukmaningtyas
 
UNICORN PROJECT - PAGE BROCHURE
UNICORN PROJECT - PAGE BROCHUREUNICORN PROJECT - PAGE BROCHURE
UNICORN PROJECT - PAGE BROCHUREUNICORN
 
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )SBGC
 
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )SBGC
 
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-students
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-studentsIeee projects-2013-2014-title-list-for-me-be-mphil-final-year-students
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-studentsPruthivi Rajan
 
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...SBGC
 

Semelhante a #5 | Data Binding | Microsoft Blazor | Sameer Siddiqui (20)

Open Data Convergence
Open Data ConvergenceOpen Data Convergence
Open Data Convergence
 
"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow
 
Real Time Head Generation for Video Conferencing
Real Time Head Generation for Video ConferencingReal Time Head Generation for Video Conferencing
Real Time Head Generation for Video Conferencing
 
UNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptxUNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptx
 
Angular crash course
Angular crash courseAngular crash course
Angular crash course
 
Angular js- 1.X
Angular js- 1.XAngular js- 1.X
Angular js- 1.X
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet App
 
Gouthami Resume(2)
Gouthami Resume(2)Gouthami Resume(2)
Gouthami Resume(2)
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
 
IEEE Projects 2013 For ME Cse @ Seabirds ( Trichy, Thanjavur, Perambalur, Di...
IEEE Projects 2013 For ME Cse @  Seabirds ( Trichy, Thanjavur, Perambalur, Di...IEEE Projects 2013 For ME Cse @  Seabirds ( Trichy, Thanjavur, Perambalur, Di...
IEEE Projects 2013 For ME Cse @ Seabirds ( Trichy, Thanjavur, Perambalur, Di...
 
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud Integration
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud IntegrationWebinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud Integration
Webinar: APPSeCONNECT Product Release 2018 - A Sneak Peek at Cloud Integration
 
Data Convergence White Paper
Data Convergence White PaperData Convergence White Paper
Data Convergence White Paper
 
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEM
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEMBLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEM
BLOCKCHAIN IMPLEMENTATION IN EDUCATIONAL SYSTEM
 
Services and Linked Data: John Domingue (KMi, UK)
Services and Linked Data: John Domingue (KMi, UK)Services and Linked Data: John Domingue (KMi, UK)
Services and Linked Data: John Domingue (KMi, UK)
 
Data Exchange Design with SDMX Format for Interoperability Statistical Data
Data Exchange Design with SDMX Format for Interoperability Statistical DataData Exchange Design with SDMX Format for Interoperability Statistical Data
Data Exchange Design with SDMX Format for Interoperability Statistical Data
 
UNICORN PROJECT - PAGE BROCHURE
UNICORN PROJECT - PAGE BROCHUREUNICORN PROJECT - PAGE BROCHURE
UNICORN PROJECT - PAGE BROCHURE
 
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )
IEEE Projects 2013 For ME Cse Seabirds ( Trichy, Thanjavur, Karur, Perambalur )
 
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )
Bulk Ieee Projects 2013 @ Seabirds ( Chennai, Trichy, Hyderabad, Pune, Mumbai )
 
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-students
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-studentsIeee projects-2013-2014-title-list-for-me-be-mphil-final-year-students
Ieee projects-2013-2014-title-list-for-me-be-mphil-final-year-students
 
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...
Ieee Projects 2013 for Cse @ Seabirds(Trichy, Pudukkottai, Perambalur, Thanja...
 

Último

Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 

Último (20)

Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 

#5 | Data Binding | Microsoft Blazor | Sameer Siddiqui

  • 1. DATA BINDING M I C R O S O F T B L A Z O R
  • 2. INTR ODUC TION o Data binding is a mechanism in Blazor that allows you to establish a connection between the application’s data and the User Interface o Enables the successful data synchronization o There are five main types of data binding: o One-way data-binding o Two-way data-binding o Event Binding o Form Binding
  • 3. O N E - WAY DATA - BIN DING o Provides one way communication between UI and code o Does not allow dynamic changes based on changes in the code. Whatever you state in your code will be reflected in your UI o If user makes any update in UI, it does not propagate back to the code o There are two methods of one-way data-binding: o Using @ syntax o Using Bind Attribute
  • 4. O N E - WAY DATA - BIN DING o We use @ symbol to get the value from the code to the UI. o We generally use this method to bind @code part of the code with @page part of the markup.
  • 5. O N E - WAY DATA - BIN DING o We use @bind-value attributes such as @bind-value and @bind- values to save or fetch data from other components or resources. o This can include saving the information into the database, getting the information from the database, displaying the information present inside the database.
  • 6. O N E - WAY DATA - BIN DING
  • 7. T W O - WAY DATA - BIN DING o Used to perform bi-directional data flow o It is commonly used with form elements, such as textboxes, checkboxes and other element, maintaining a synchronized state o The two-way data-binding uses @bind directive to perform the communication, typically applied to the value attribute of an input element o Simplifies the process of handling user inputs and keeping the UI and application process synchronized
  • 8. T W O - WAY DATA - BIN DING o Used to perform bi-directional data flow o It is commonly used with form elements, such as textboxes, checkboxes and other element, maintaining a synchronized state o The two-way data-binding uses @bind directive to perform the communication, typically applied to the value attribute of an input element o Simplifies the process of handling user inputs and keeping the UI and application process synchronized
  • 9. T W O - WAY DATA - BIN DING
  • 10. EVEN T BI NDIN G o Event binding refers to the process of associating C# methods with multiple HTML events o This mechanism enables you to handle events such as button clicks, mouse movements, and keyboard inputs, making the web application interactive and responsive o This includes @onclick, @oninput, @onchange, @onmouseover etc.
  • 11. FORM BIN DING o Form binding refers to the process of associating a Blazor components with the HTML form and handling form submissions o Uses the Blazor’s in-built feature “EditForm” that simplifies the implementation of form-related functionality o This also helps in form-related functionality, including model binding, validation and event handling