SkyoceanHome
Home
Privacy
ダウンロード
SkyShop
Updated Information
チュートリアルコード集
References
記事編集
日付
ジャンルのカテゴリ―名
名前を選択して下さい。
Contexts
Controllers
Databases
Htmls
JavaScripts
Models
MVCTutorials
Others
Styles
Views
タイトル
内容の要旨
<p style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 4px; padding: revert; -webkit-line-clamp: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-pasted="true">了解しました。<br>前回のコードをベースに、さらに<strong style="font-weight: 700;">実務向けの改善</strong>を加えた新しいバージョンを提示します。<br>今回の変更点は以下の通りです。</p><ul style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: revert; padding: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;"><strong style="font-weight: 700;">トランザクション処理</strong>を追加(更新の信頼性向上)</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;"><strong style="font-weight: 700;">ModelState</strong> を使ったサーバー側バリデーション</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;"><strong style="font-weight: 700;">ログ出力例</strong>を追加(例:<code style="border-radius: 8px; background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255);">ILogger</code>)</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;">JavaScript 側で <strong style="font-weight: 700;">ローディング表示</strong> を追加</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;">SweetAlert2 の <strong style="font-weight: 700;">confirm/cancel 両方の分岐処理</strong> を明確化</li></ul><h2 style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: revert; padding: revert; font: 22px / 24px roboto, helvetica, sans-serif; height: 32px; -webkit-line-clamp: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; color: rgba(0, 0, 0, 0.8); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong style="font-weight: 700;">1. Controller 側(更新アクション)</strong></h2><pre data-priority="2" style="background: none 0% 0% / auto repeat scroll padding-box border-box rgb(245, 245, 245); border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; color: rgba(0, 0, 0, 0.8); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div data-bm="39" style="display: flex; height: 28px; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); background: none 0% 0% / auto repeat scroll padding-box border-box rgb(243, 249, 254);"><h5 style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 0px; padding: revert; font-style: normal !important; font-variant: normal !important; font-weight: 400 !important; font-stretch: 100% !important; line-height: 18px; font-family: roboto, helvetica, sans-serif !important; font-optical-sizing: auto !important; font-size-adjust: none !important; font-kerning: auto !important; font-feature-settings: normal !important; font-variation-settings: normal !important; font-language-override: normal !important; font-size: 16px; display: inline-block; color: rgb(11, 73, 127);">Csharp</h5><div style="height: 28px;"><button type="button" tabindex="" title="Copy code" style="box-sizing: border-box; margin: 0px; padding: 0px; font: 400 13px / 20px roboto, helvetica, sans-serif; background-color: rgb(225, 240, 253); border: 1px solid rgba(0, 0, 0, 0); display: grid; grid-auto-flow: column; align-items: center; cursor: pointer; color: rgb(0, 0, 0) !important; text-decoration: none !important; border-radius: 9999px; block-size: 28px; gap: 2px; padding-inline: 10px;"><div style="box-sizing: border-box; margin: 0px; padding: 0px; min-inline-size: 0px; max-inline-size: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: clip; max-block-size: calc(1lh); padding-inline: 2px;">Copy code</div></button></div></div><code style="border-radius: 8px; background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255); display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 16px 16px;"><span style="color: rgb(215, 58, 73);">using</span> Microsoft.AspNetCore.Mvc; <span style="color: rgb(215, 58, 73);">using</span> Microsoft.EntityFrameworkCore; <span style="color: rgb(215, 58, 73);">using</span> Microsoft.Extensions.Logging; <span style="color: rgb(215, 58, 73);">using</span> System; <span style="color: rgb(215, 58, 73);">using</span> System.Threading; <span style="color: rgb(215, 58, 73);">using</span> System.Threading.Tasks; <span style="color: rgb(215, 58, 73);">using</span> YourAppNamespace.Data; <span style="color: rgb(215, 58, 73);">using</span> YourAppNamespace.Models; <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(215, 58, 73);">class</span> <span style="color: rgb(111, 66, 193);">PaymentsController</span> : <span style="color: rgb(111, 66, 193);">Controller</span> { <span style="color: rgb(215, 58, 73);">private</span> <span style="color: rgb(215, 58, 73);">readonly</span> ApplicationDbContext _context; <span style="color: rgb(215, 58, 73);">private</span> <span style="color: rgb(215, 58, 73);">readonly</span> ILogger<PaymentsController> _logger; <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(111, 66, 193);">PaymentsController</span>(ApplicationDbContext context, ILogger<PaymentsController> logger) { _context = context; _logger = logger; } [<span style="color: rgb(0, 92, 197);">HttpPost</span>] [<span style="color: rgb(0, 92, 197);">ValidateAntiForgeryToken</span>] <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(215, 58, 73);">async</span> Task<IActionResult> <span style="color: rgb(111, 66, 193);">UpdatePayment</span>( [FromBody] PaymentUpdateDto dto, CancellationToken cancellationToken) { <span style="color: rgb(215, 58, 73);">if</span> (!ModelState.IsValid || dto == <span style="color: rgb(0, 92, 197);">null</span> || dto.PaymentId <= <span style="color: rgb(0, 92, 197);">0</span>) { <span style="color: rgb(215, 58, 73);">return</span> BadRequest(<span style="color: rgb(215, 58, 73);">new</span> { message = <span style="color: rgb(3, 47, 98);">"入力データが不正です。"</span> }); } <span style="color: rgb(215, 58, 73);">if</span> (dto.Amount < <span style="color: rgb(0, 92, 197);">0</span>) { <span style="color: rgb(215, 58, 73);">return</span> BadRequest(<span style="color: rgb(215, 58, 73);">new</span> { message = <span style="color: rgb(3, 47, 98);">"金額は0以上で入力してください。"</span> }); } <span style="color: rgb(215, 58, 73);">await</span> <span style="color: rgb(215, 58, 73);">using</span> <span style="color: rgb(215, 58, 73);">var</span> transaction = <span style="color: rgb(215, 58, 73);">await</span> _context.Database.BeginTransactionAsync(cancellationToken); <span style="color: rgb(215, 58, 73);">try</span> { <span style="color: rgb(215, 58, 73);">var</span> payment = <span style="color: rgb(215, 58, 73);">await</span> _context.Payments .FirstOrDefaultAsync(p => p.PaymentId == dto.PaymentId, cancellationToken); <span style="color: rgb(215, 58, 73);">if</span> (payment == <span style="color: rgb(0, 92, 197);">null</span>) { <span style="color: rgb(215, 58, 73);">return</span> NotFound(<span style="color: rgb(215, 58, 73);">new</span> { message = <span style="color: rgb(3, 47, 98);">"指定された支払いデータが見つかりません。"</span> }); } payment.IncomeCategoryId = dto.IncomeCategoryId; payment.Amount = dto.Amount; payment.UpdatedAt = DateTime.UtcNow; <span style="color: rgb(215, 58, 73);">await</span> _context.SaveChangesAsync(cancellationToken); <span style="color: rgb(215, 58, 73);">await</span> transaction.CommitAsync(cancellationToken); _logger.LogInformation(<span style="color: rgb(3, 47, 98);">"Payment {PaymentId} updated successfully."</span>, dto.PaymentId); <span style="color: rgb(215, 58, 73);">return</span> Ok(<span style="color: rgb(215, 58, 73);">new</span> { message = <span style="color: rgb(3, 47, 98);">"更新が完了しました。"</span> }); } <span style="color: rgb(215, 58, 73);">catch</span> (Exception ex) { <span style="color: rgb(215, 58, 73);">await</span> transaction.RollbackAsync(cancellationToken); _logger.LogError(ex, <span style="color: rgb(3, 47, 98);">"Payment update failed for ID {PaymentId}"</span>, dto.PaymentId); <span style="color: rgb(215, 58, 73);">return</span> StatusCode(<span style="color: rgb(0, 92, 197);">500</span>, <span style="color: rgb(215, 58, 73);">new</span> { message = <span style="color: rgb(3, 47, 98);">"更新処理中にエラーが発生しました。"</span>, error = ex.Message }); } } } <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(215, 58, 73);">class</span> <span style="color: rgb(111, 66, 193);">PaymentUpdateDto</span> { <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(227, 98, 9);">int</span> PaymentId { <span style="color: rgb(215, 58, 73);">get</span>; <span style="color: rgb(215, 58, 73);">set</span>; } <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(227, 98, 9);">int</span> IncomeCategoryId { <span style="color: rgb(215, 58, 73);">get</span>; <span style="color: rgb(215, 58, 73);">set</span>; } <span style="color: rgb(215, 58, 73);">public</span> <span style="color: rgb(227, 98, 9);">decimal</span> Amount { <span style="color: rgb(215, 58, 73);">get</span>; <span style="color: rgb(215, 58, 73);">set</span>; } } </code></pre><h2 style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: revert; padding: revert; font: 22px / 24px roboto, helvetica, sans-serif; height: 32px; -webkit-line-clamp: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; color: rgba(0, 0, 0, 0.8); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong style="font-weight: 700;">2. View 側 JavaScript(SweetAlert2 + Ajax + ローディング表示)</strong></h2><pre data-priority="2" style="background: none 0% 0% / auto repeat scroll padding-box border-box rgb(245, 245, 245); border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; color: rgba(0, 0, 0, 0.8); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div data-bm="40" style="display: flex; height: 28px; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); background: none 0% 0% / auto repeat scroll padding-box border-box rgb(243, 249, 254);"><h5 style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 0px; padding: revert; font-style: normal !important; font-variant: normal !important; font-weight: 400 !important; font-stretch: 100% !important; line-height: 18px; font-family: roboto, helvetica, sans-serif !important; font-optical-sizing: auto !important; font-size-adjust: none !important; font-kerning: auto !important; font-feature-settings: normal !important; font-variation-settings: normal !important; font-language-override: normal !important; font-size: 16px; display: inline-block; color: rgb(11, 73, 127);">Html</h5><div style="height: 28px;"><button type="button" tabindex="" title="Copy code" style="box-sizing: border-box; margin: 0px; padding: 0px; font: 400 13px / 20px roboto, helvetica, sans-serif; background-color: rgb(225, 240, 253); border: 1px solid rgba(0, 0, 0, 0); display: grid; grid-auto-flow: column; align-items: center; cursor: pointer; color: rgb(0, 0, 0) !important; text-decoration: none !important; border-radius: 9999px; block-size: 28px; gap: 2px; padding-inline: 10px;"><div style="box-sizing: border-box; margin: 0px; padding: 0px; min-inline-size: 0px; max-inline-size: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: clip; max-block-size: calc(1lh); padding-inline: 2px;">Copy code</div></button></div></div><code style="border-radius: 8px; background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255); display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 16px 16px;"><<span style="color: rgb(34, 134, 58);">script</span> <span style="color: rgb(0, 92, 197);">src</span>=<span style="color: rgb(3, 47, 98);">"https://code.jquery.com/jquery-3.6.0.min.js"</span>></<span style="color: rgb(34, 134, 58);">script</span>> <<span style="color: rgb(34, 134, 58);">script</span> <span style="color: rgb(0, 92, 197);">src</span>=<span style="color: rgb(3, 47, 98);">"https://cdn.jsdelivr.net/npm/sweetalert2@11"</span>></<span style="color: rgb(34, 134, 58);">script</span>> <<span style="color: rgb(34, 134, 58);">script</span>> }).<span style="color: rgb(111, 66, 193);">then</span>((result) => { <span style="color: rgb(215, 58, 73);">if</span> (result.isConfirmed && paymentId && paymentId > <span style="color: rgb(0, 92, 197);">0</span>) { <span style="color: rgb(215, 58, 73);">const</span> data = { <span style="color: rgb(0, 92, 197);">paymentId</span>: paymentId, <span style="color: rgb(0, 92, 197);">incomeCategoryId</span>: result.value.incomeCategoryId, <span style="color: rgb(0, 92, 197);">amount</span>: result.value.amount }; <span style="color: rgb(111, 66, 193);">Swal</span>.<span style="color: rgb(111, 66, 193);">fire</span>({ <span style="color: rgb(0, 92, 197);">title</span>: <span style="color: rgb(3, 47, 98);">'更新中...'</span>, <span style="color: rgb(0, 92, 197);">allowOutsideClick</span>: <span style="color: rgb(0, 92, 197);">false</span>, <span style="color: rgb(0, 92, 197);">didOpen</span>: () => { <span style="color: rgb(111, 66, 193);">Swal</span>.<span style="color: rgb(111, 66, 193);">showLoading</span>(); } }); $.<span style="color: rgb(111, 66, 193);">ajax</span>({ <span style="color: rgb(0, 92, 197);">url</span>: <span style="color: rgb(3, 47, 98);">'/Payments/UpdatePayment'</span>, <span style="color: rgb(0, 92, 197);">type</span>: <span style="color: rgb(3, 47, 98);">'POST'</span>, <span style="color: rgb(0, 92, 197);">contentType</span>: <span style="color: rgb(3, 47, 98);">'application/json'</span>, <span style="color: rgb(0, 92, 197);">headers</span>: { <span style="color: rgb(3, 47, 98);">'RequestVerificationToken'</span>: $(<span style="color: rgb(3, 47, 98);">'input[name="__RequestVerificationToken"]'</span>).<span style="color: rgb(111, 66, 193);">val</span>() }, <span style="color: rgb(0, 92, 197);">data</span>: <span style="color: rgb(111, 66, 193);">JSON</span>.<span style="color: rgb(111, 66, 193);">stringify</span>(data), <span style="color: rgb(0, 92, 197);">success</span>: <span style="color: rgb(215, 58, 73);">function</span> (response) { <span style="color: rgb(111, 66, 193);">Swal</span>.<span style="color: rgb(111, 66, 193);">fire</span>({ <span style="color: rgb(0, 92, 197);">icon</span>: <span style="color: rgb(3, 47, 98);">'success'</span>, <span style="color: rgb(0, 92, 197);">title</span>: <span style="color: rgb(3, 47, 98);">'更新成功'</span>, <span style="color: rgb(0, 92, 197);">text</span>: response.message, <span style="color: rgb(0, 92, 197);">confirmButtonText</span>: <span style="color: rgb(3, 47, 98);">'OK'</span> }).<span style="color: rgb(111, 66, 193);">then</span>(() => { location.<span style="color: rgb(111, 66, 193);">reload</span>(); }); }, <span style="color: rgb(0, 92, 197);">error</span>: <span style="color: rgb(215, 58, 73);">function</span> (xhr) { <span style="color: rgb(215, 58, 73);">let</span> msg = xhr.responseJSON?.message || <span style="color: rgb(3, 47, 98);">'不明なエラーが発生しました。'</span>; <span style="color: rgb(111, 66, 193);">Swal</span>.<span style="color: rgb(111, 66, 193);">fire</span>({ <span style="color: rgb(0, 92, 197);">icon</span>: <span style="color: rgb(3, 47, 98);">'error'</span>, <span style="color: rgb(0, 92, 197);">title</span>: <span style="color: rgb(3, 47, 98);">'更新失敗'</span>, <span style="color: rgb(0, 92, 197);">text</span>: msg, <span style="color: rgb(0, 92, 197);">confirmButtonText</span>: <span style="color: rgb(3, 47, 98);">'閉じる'</span> }); } }); } <span style="color: rgb(215, 58, 73);">else</span> <span style="color: rgb(215, 58, 73);">if</span> (result.isDismissed) { <span style="color: rgb(111, 66, 193);">Swal</span>.<span style="color: rgb(111, 66, 193);">fire</span>({ <span style="color: rgb(0, 92, 197);">icon</span>: <span style="color: rgb(3, 47, 98);">'info'</span>, <span style="color: rgb(0, 92, 197);">title</span>: <span style="color: rgb(3, 47, 98);">'キャンセルしました'</span>, <span style="color: rgb(0, 92, 197);">timer</span>: <span style="color: rgb(0, 92, 197);">1500</span>, <span style="color: rgb(0, 92, 197);">showConfirmButton</span>: <span style="color: rgb(0, 92, 197);">false</span> }); } }); </<span style="color: rgb(34, 134, 58);">script</span>> </code></pre><h2 style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: revert; padding: revert; font: 22px / 24px roboto, helvetica, sans-serif; height: 32px; -webkit-line-clamp: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; color: rgba(0, 0, 0, 0.8); letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong style="font-weight: 700;">3. 改良ポイント</strong></h2><ul style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: revert; padding: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;"><strong style="font-weight: 700;">トランザクション</strong>で更新の信頼性を確保。</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;"><strong style="font-weight: 700;">ILogger</strong> で更新成功・失敗をログ出力。</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;">SweetAlert2 で <strong style="font-weight: 700;">ローディング表示</strong> を追加し、処理中のユーザー体験を改善。</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;">キャンセル時の UI 表示を追加。</li><li style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin-top: revert; margin-right: revert; margin-bottom: 8px; margin-left: revert; padding: revert;">エラー時の詳細メッセージを Ajax 側で取得して表示。</li></ul><p style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 4px; padding: revert; -webkit-line-clamp: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">この形にすれば、<strong style="font-weight: 700;">安全性・可読性・ユーザー体験</strong> のすべてを強化できます。</p><p style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 4px; padding: revert; -webkit-line-clamp: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">もし希望があれば、このコードを <strong style="font-weight: 700;">Index.cshtml に完全統合した動作版</strong> として提供できます。<br>そうすれば、即動作確認が可能です。</p><p style="border: 0px; border-collapse: collapse; border-spacing: 0px; list-style-position: initial; list-style-image: initial; list-style-type: revert; margin: 4px; padding: revert; -webkit-line-clamp: revert; color: rgba(0, 0, 0, 0.8); font-family: roboto, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">この統合版を作成しますか?</p><p data-f-id="pbf" style="text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;">Powered by <a href="https://www.froala.com/wysiwyg-editor?pb=1" title="Froala Editor">Froala Editor</a></p>
コピーする
添付画像
画像を変更
Back to List
//検索文:Editor内でHTMLコードをコピーさせる