01 2024 档案

摘要:cshtml一般是这样: @page @model IndexModel @{ ViewData["Title"] = "Home page"; } <div class="text-center"> <h1 class="display-4">Welcome</h1> <p>Learn about 阅读全文
posted @ 2024-01-21 10:55 JohnYang819 阅读(81) 评论(0) 推荐(0) 编辑
摘要:install-package WindowsAPICodePack var folderDialog = new CommonOpenFileDialog() { Title = "xxx", IsFolderPicker = true, }; if (folderDialog.ShowDialo 阅读全文
posted @ 2024-01-16 21:44 JohnYang819 阅读(199) 评论(0) 推荐(0) 编辑
摘要:字符串的存储长度是可变的,在C#中,BinaryWriter和BinaryReader在Write,ReadStirng的时候,都在单个流中字符串的二进制数组前面加了一个二进制数组的长度信息,方便读取的时候,造成了记录字符串的流并不纯粹是字符串的内容。但是,有时候,我们可以,也可能必须记录纯粹的字符 阅读全文
posted @ 2024-01-15 10:14 JohnYang819 阅读(11) 评论(0) 推荐(0) 编辑
摘要:(1)与关键字冲突,解决办法加@ var a = new { @class=1, }; var d = JsonConvert.SerializeObject(a); Console.WriteLine(d); output {"class":1} (2)接参数,dynamic神搭配! var a 阅读全文
posted @ 2024-01-12 19:20 JohnYang819 阅读(36) 评论(0) 推荐(0) 编辑
摘要:1.赋予参数 @page "{id}" @model RazorTest.Pages.TestBModel @{ } <p>TestBId is @Model.TestBId</p> using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore 阅读全文
posted @ 2024-01-02 13:55 JohnYang819 阅读(93) 评论(0) 推荐(0) 编辑
摘要:cshtml.cs using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace RazorTest.Pages { public class PrivacyModel : PageModel 阅读全文
posted @ 2024-01-01 11:12 JohnYang819 阅读(53) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示