asp.net core弹出对话框最佳实践

浪淘沙5个月前后端113
 public void OnGet()
 {         
     TempData["AlertMessage"] = "操作成功!";     

 }
@if (TempData["AlertMessage"] != null)
{
    <script>
        alert('@Html.Raw(TempData["AlertMessage"])');
        var p=parent.layer.getFrameIndex(window.name); parent.layer.close(p); parent.location.reload();
    </script>
}


相关文章

asp.net core razor OnGet 异步写法

public async Task<IActionResult> OnGetAsync() {     var&n...

asp.net core rzaor page 中的ViewComponent 视图用法

asp.net core rzaor page 中的ViewComponent 视图用法

1、/Pages/Components 新建:MyViewComponent.csusing Microsoft.AspNetCore.Mvc; namespace xxts...

asp.net core razor 远程请求 认证Basic auth 模式 body传递 json

private readonly HttpClient _httpClient;    public RemoteReq...

JNTemplate 文章标签解析

using JinianNet.JNTemplate; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetC...

JNTemplate 模板标签传递url参数

一、模板 private readonly SqlSugar.ISqlSugarClient _db;  public Index1M...

asp.net core 引用ckeditor编辑器

网页<script src="~/ckeditor/ckeditor.js"></script> <script src=&qu...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。