[SOLVED] ItemDataBound in A Datalist in ASP.NET

Issue After reading Formatting the DataList and Repeater Based Upon Data (C#) on Microsoft Website I found the following code sample. protected void ItemDataBoundFormattingExample_ItemDataBound(object sender, DataListItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { // Programmatically reference

Continue reading

[SOLVED] How to work with modal window in ASP NET 6?

Issue I have a HTML code: <div class="container"> <div class="row"> @foreach(var post in Model) { <div class="col-sm-8"> <div class="row"> <div class="post-body container shadow p-3 mb-3 rounded-3"> <h2>@post.Title</h2> <p>@post.Description</p> <button type="button" class="show-post-btn btn btn-secondary" data-bs-toggle="modal" data-bs-target="#wholePost" onclick="return showContent()">Show post…</button> </div> <div

Continue reading