syncfusion-aspnetcore-dialog
Implementing Dialog — ASP.NET Core
This skill documents how to implement, configure, and customize the Syncfusion Dialog in ASP.NET Core applications using the <ejs-dialog> Tag Helper API. It covers setup, modality, positioning, animations, templates, events, accessibility, and styling.
Quick Links
- Getting Started
- Basic Features
- Positioning & Sizing
- Animations & Transitions
- Templates
- Accessibility & Localization
- Events & Interactions
- Styling & Themes
When To Use
- You need a versatile modal or non-modal dialog for confirmations, alerts, or content display.
- You want server-side configuration via Tag Helper syntax in ASP.NET Core.
- You need animations, custom templates, or advanced positioning control.
- You require accessibility compliance and multi-language support.
Quick Start (Tag Helper)
In your Razor view:
@using Syncfusion.EJ2
<ejs-dialog id="dialog" header="Welcome" is-modal="true" width="500px">
<e-content-template>
<p>This is a basic dialog with default settings.</p>
</e-content-template>
</ejs-dialog>
<script>
var dialogObj = document.getElementById('dialog').ej2_instances[0];
document.getElementById('openBtn').onclick = function() {
dialogObj.show();
};
</script>
Ensure you include the script manager and styles in your layout (_Layout.cshtml):
<!-- In <head> -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/{{ site.ej2version }}/fluent.css" />
<!-- At end of <body> -->
<script src="https://cdn.syncfusion.com/ej2/{{ site.ej2version }}/dist/ej2.min.js"></script>
<ejs-scripts></ejs-scripts>
Common Patterns
Modal Confirmation Dialog
<ejs-dialog id="confirmDialog" header="Confirm Action" is-modal="true" width="400px">
<e-dialog-buttons>
<e-dialog-button content="Yes" is-primary="true" on-click="confirmAction"></e-dialog-button>
<e-dialog-button content="No" on-click="closeDialog"></e-dialog-button>
</e-dialog-buttons>
<e-content-template>
<p>Are you sure you want to proceed?</p>
</e-content-template>
</ejs-dialog>
Draggable Dialog with Header
<ejs-dialog id="draggableDialog"
header="Drag Me"
allow-dragging="true"
width="500px"
show-close-icon="true">
<e-content-template>
<p>Grab the header to drag this dialog.</p>
</e-content-template>
</ejs-dialog>
Centered Dialog
<ejs-dialog id="centeredDialog"
header="Centered Position"
width="500px"
position-x="center"
position-y="center">
<e-content-template>
<p>This dialog is centered on the page.</p>
</e-content-template>
</ejs-dialog>
Key Properties
| Property | Type | Purpose | Example |
|---|---|---|---|
header |
string | Dialog title bar | header="Confirm Delete" |
is-modal |
bool | Shows overlay behind dialog | is-modal="true" |
width |
string | Dialog width (px, %) | width="500px" |
height |
string | Dialog height (px, %) | height="300px" |
allow-dragging |
bool | Enable drag to reposition | allow-dragging="true" |
show-close-icon |
bool | Display close button | show-close-icon="true" |
position-x |
string | Horizontal position (left, center, right, offset) | position-x="center" |
position-y |
string | Vertical position (top, center, bottom, offset) | position-y="center" |
animation |
object | Animation settings | animation-effect="Zoom" |
is-hidden |
bool | Initially hidden state | is-hidden="true" |
Next Steps
Read getting-started.md for full installation steps, NuGet package setup, and configuration details.
More from syncfusion/aspnetcore-ui-components-skills
syncfusion-aspnetcore-charts
Implements Syncfusion ASP.NET Core Chart (SfChart) for data visualization. Use this when building charts, visualizing time-series or categorical data, or creating dashboards. Covers series configuration (line, bar, pie), axes, tooltips, legends, and customization for ASP.NET Core applications.
11syncfusion-aspnetcore-theme
**THEMING & APPEARANCE GUIDE** — Assist with Syncfusion ASP.NET Core EJ2 component theming, customization, size modes, and dynamic theme switching. Use when: applying themes (Bootstrap, Material, Tailwind, Fluent, etc.), customizing theme variables, implementing theme switchers, enabling touch mode, or customizing icons and appearance.
10syncfusion-aspnetcore-combobox
Implement Syncfusion ASP.NET Core ComboBox component for dropdown selection with filtering, data binding, and customization. Use this when creating dropdown controls, enabling user selection from lists, implementing autocomplete/search functionality, or handling cascading dropdowns. Covers installation, basic setup, data binding, filtering, templates, grouping, and advanced features.
10syncfusion-aspnetcore-grid
Implements Syncfusion ASP.NET Core Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
10syncfusion-aspnetcore-ai-assistview
Implement the Syncfusion ASP.NET Core AI AssistView control for interactive AI-powered assistance interfaces. Use this skill when implementing AI assistants, prompt suggestions, custom views, file attachments, markdown responses, customizable templates, assistance features, file uploads, or customizing AI conversation UI in ASP.NET Core applications.
10syncfusion-aspnetcore-dropdownlist
Implement Syncfusion DropdownList component in ASP.NET Core immediately. Single selection control with data binding, filtering, grouping, templates, and accessibility features. Essential for building professional dropdown interfaces with server-side data binding.
10