首页
归档
留言
友链
广告合作
壁纸
更多
美女主播
Search
1
博瑞GE车机升级/降级
5,583 阅读
2
Mac打印机设置黑白打印
4,897 阅读
3
修改elementUI中el-table树形结构图标
4,871 阅读
4
Mac客户端添加腾讯企业邮箱方法
4,652 阅读
5
intelliJ Idea 2022.2.X破解
4,329 阅读
后端开发
HarmonyOS Next
Web前端
微信开发
开发辅助
App开发
数据库
随笔日记
登录
/
注册
Search
标签搜索
Spring Boot
Java
Vue
Spring Cloud
Mac
MyBatis
WordPress
asp.net
Element UI
Nacos
MacOS
.Net
Spring Cloud Alibaba
MySQL
Mybatis-Plus
Typecho
jQuery
Java Script
微信小程序
Oracle
Laughing
累计撰写
613
篇文章
累计收到
1,417
条评论
首页
栏目
后端开发
HarmonyOS Next
Web前端
微信开发
开发辅助
App开发
数据库
随笔日记
页面
归档
留言
友链
广告合作
壁纸
美女主播
搜索到
1
篇与
的结果
2019-02-27
asp.net core视图组件
what试图组件是ASP.NET Core MVC中的新特性,类似于部分视图,但是它更加强大。驶入组件不使用模型绑定,并且仅依赖于调用它时所提供的数据。how创建视图组件类using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Web.ViewComponents { [ViewComponent(Name = "TopicRankList")] public class TopicRankList : ViewComponent { public IViewComponentResult Invoke() { return View(); } } } 视图搜索路径视图组件的默认视图名称是Default,这意味着你的视图文件通常名为Default.cshtml,可以在创建视图组件结果或调用View方法时指定其他视图名称。视图组件运行时会在以下路径中搜索视图:Views//Components// Views/Shared/Components//所以根据创建的类,我们需要在Views/Shared/Components/TopicRankList文件夹中创建Default.cshtml文件。@{ ViewData["Title"] = "Default"; } <h1>Default</h1>调用视图@await Component.InvokeAsync("TopicRankList")
2019年02月27日
1,127 阅读
0 评论
1 点赞